Skip to content

API XMLSec MSCrypto CertKeys

Aleksey Sanin edited this page Jun 22, 2026 · 5 revisions

MsCrypto Certificate Keys

API Group: xmlsec_mscrypto_certkeys

Certificate-based key handling for the MsCrypto back-end.

Certificate keys support functions for Microsoft Crypto API.

Functions

xmlSecMSCryptoKeyDataGetCert

void * xmlSecMSCryptoKeyDataGetCert(xmlSecKeyDataPtr data);

Source: include/xmlsec/mscrypto/certkeys.h

Native MSCrypto certificate retrieval from xmlsec keydata. The.

Parameters:

  • data — the key data to retrieve certificate from. returned PCCERT_CONTEXT must not be released by the caller.

Returns: PCCERT_CONTEXT on success or NULL otherwise.


xmlSecMSCryptoKeyDataGetKey

void * xmlSecMSCryptoKeyDataGetKey(xmlSecKeyDataPtr data, xmlSecKeyDataType type);

Source: include/xmlsec/mscrypto/certkeys.h

Native MSCrypto key retrieval from xmlsec keydata. The.

Parameters:

  • data — the key data to retrieve certificate from.
  • type — type of key requested (public/private) returned HKEY must not be destroyed by the caller.

Returns: HKEY on success or NULL otherwise.


xmlSecMSCryptoKeyDataGetDecryptKey

void * xmlSecMSCryptoKeyDataGetDecryptKey(xmlSecKeyDataPtr data);

Source: include/xmlsec/mscrypto/certkeys.h

Native MSCrypto decrypt key retrieval from xmlsec keydata. The.

Parameters:

  • data — the key data pointer returned HKEY must not be destroyed by the caller.

Returns: HKEY on success or NULL otherwise.


xmlSecMSCryptoCertDup

void * xmlSecMSCryptoCertDup(void *pCert);

Source: include/xmlsec/mscrypto/certkeys.h

Duplicates the pCert.

Parameters:

  • pCert — the pointer to cert.

Returns: pointer to newly created PCCERT_CONTEXT object or NULL if an error occurs.


xmlSecMSCryptoCertAdopt

xmlSecKeyDataPtr xmlSecMSCryptoCertAdopt(void *pCert, xmlSecKeyDataType type);

Source: include/xmlsec/mscrypto/certkeys.h

Creates key data value from the cert.

Parameters:

  • pCert — the pointer to cert.
  • type — the expected key type.

Returns: pointer to newly created xmlsec key or NULL if an error occurs.


xmlSecMSCryptoKeyDataGetMSCryptoProvider

void * xmlSecMSCryptoKeyDataGetMSCryptoProvider(xmlSecKeyDataPtr data);

Source: include/xmlsec/mscrypto/certkeys.h

Gets crypto provider handle.

Parameters:

  • data — the key data

Returns: the crypto provider handler or 0 if there is an error.


xmlSecMSCryptoKeyDataGetMSCryptoKeySpec

unsigned long xmlSecMSCryptoKeyDataGetMSCryptoKeySpec(xmlSecKeyDataPtr data);

Source: include/xmlsec/mscrypto/certkeys.h

Gets key spec info.

Parameters:

  • data — the key data

Returns: the key spec info from key data


xmlSecMSCryptoKeyDataGetMSCryptoProviderInfo

PCRYPT_KEY_PROV_INFO xmlSecMSCryptoKeyDataGetMSCryptoProviderInfo(xmlSecKeyDataPtr data);

Source: include/xmlsec/mscrypto/certkeys.h

Gets key provider info.

Parameters:

  • data — the key data

Returns: the key provider info.


Clone this wiki locally