- Home
- Download
- News
- Documentation

- FAQ
- Tutorial
- API reference
- Examples

- XML Digital Signature

- Online Verifier

- XML Encryption
- XML Canonicalization
- Reporting Bugs
- Mailing list
- Related
- Authors

# keysstore

## Name

keysstore -- Keys store implementation for NSS.

## Synopsis

    intxmlSecNssKeysStoreAdoptKey          (xmlSecKeyStorePtr store,
                                                             xmlSecKeyPtr key);
    xmlSecKeyStoreIdxmlSecNssKeysStoreGetKlass          (void);
    #define             xmlSecNssKeysStoreId
    intxmlSecNssKeysStoreLoad              (xmlSecKeyStorePtr store,
                                                             const char *uri,
                                                             xmlSecKeysMngrPtr keysMngr);
    intxmlSecNssKeysStoreSave              (xmlSecKeyStorePtr store,
                                                             const char *filename,
                                                             xmlSecKeyDataType type);

## Description

Keys store implementation for NSS.

## Details

### xmlSecNssKeysStoreAdoptKey ()

    int                 xmlSecNssKeysStoreAdoptKey          (xmlSecKeyStorePtr store,
                                                             xmlSecKeyPtr key);

Adds `key` to the `store`.

`store` : | the pointer to Nss keys store.
`key` : | the pointer to key.
Returns : | 0 on success or a negative value if an error occurs.

### xmlSecNssKeysStoreGetKlass ()

    xmlSecKeyStoreId    xmlSecNssKeysStoreGetKlass          (void);

The Nss list based keys store klass.

Returns : | Nss list based keys store klass.

### xmlSecNssKeysStoreId

    #define xmlSecNssKeysStoreId            xmlSecNssKeysStoreGetKlass()

A Nss keys store klass id.

### xmlSecNssKeysStoreLoad ()

    int                 xmlSecNssKeysStoreLoad              (xmlSecKeyStorePtr store,
                                                             const char *uri,
                                                             xmlSecKeysMngrPtr keysMngr);

Reads keys from an XML file.

`store` : | the pointer to Nss keys store.
`uri` : | the filename.
`keysMngr` : | the pointer to associated keys manager.
Returns : | 0 on success or a negative value if an error occurs.

### xmlSecNssKeysStoreSave ()

    int                 xmlSecNssKeysStoreSave              (xmlSecKeyStorePtr store,
                                                             const char *filename,
                                                             xmlSecKeyDataType type);

Writes keys from `store` to an XML file.

`store` : | the pointer to Nss keys store.
`filename` : | the filename.
`type` : | the saved keys type (public, private, ...).
Returns : | 0 on success or a negative value if an error occurs.