Skip to content

API XMLSec MSCrypto KeysStore

Aleksey Sanin edited this page Apr 22, 2026 · 4 revisions

MsCrypto Keys Store

API Group: xmlsec_mscrypto_keysstore

MsCrypto-specific key store implementation.

Keys store implementation for Microsoft Crypto API. MSCrypto keys store that uses Simple Keys Store under the hood. Uses the MS Certificate store as a backing store for the finding keys, but the MS Certificate store not written to by the keys store. So, if store->findkey is done and the key is not found in the simple keys store, the MS Certificate store is looked up. Thus, the MS Certificate store can be used to pre-load keys and becomes an alternate source of keys for xmlsec.

Macros

xmlSecMSCryptoKeysStoreId

Defined as: xmlSecMSCryptoKeysStoreGetKlass()

Source: include/xmlsec/mscrypto/keysstore.h

A MSCrypto keys store klass id.


Functions

xmlSecMSCryptoKeysStoreGetKlass

xmlSecKeyStoreId xmlSecMSCryptoKeysStoreGetKlass(void);

Source: include/xmlsec/mscrypto/keysstore.h

The MSCrypto list based keys store klass.

Returns: MSCrypto list based keys store klass.


xmlSecMSCryptoKeysStoreAdoptKey

int xmlSecMSCryptoKeysStoreAdoptKey(xmlSecKeyStorePtr store, xmlSecKeyPtr key);

Source: include/xmlsec/mscrypto/keysstore.h

Adds key to the store.

Parameters:

  • store — the pointer to MSCrypto keys store.
  • key — the pointer to key.

Returns: 0 on success or a negative value if an error occurs.


xmlSecMSCryptoKeysStoreLoad

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

Source: include/xmlsec/mscrypto/keysstore.h

Reads keys from an XML file.

Parameters:

  • store — the pointer to MSCrypto keys store.
  • uri — the filename.
  • keysMngr — the pointer to associated keys manager.

Returns: 0 on success or a negative value if an error occurs.


xmlSecMSCryptoKeysStoreSave

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

Source: include/xmlsec/mscrypto/keysstore.h

Writes keys from store to an XML file.

Parameters:

  • store — the pointer to MSCrypto keys store.
  • filename — the filename.
  • type — the saved keys type (public, private, ...).

Returns: 0 on success or a negative value if an error occurs.


Clone this wiki locally