Skip to content

API XMLSec MSCng CertKeys

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

MsCng Certificate Keys

API Group: xmlsec_mscng_certkeys

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

XDH (X25519) key support functions for Microsoft Cryptography API: Next Generation (CNG).

DSA key support functions for Microsoft Cryptography API: Next Generation (CNG).

DH key support functions for Microsoft Cryptography API: Next Generation (CNG).

Certificate keys support functions for Microsoft Cryptography API: Next Generation (CNG).

Functions

xmlSecMSCngCertAdopt

xmlSecKeyDataPtr xmlSecMSCngCertAdopt(void *pCert, xmlSecKeyDataType type);

Source: include/xmlsec/mscng/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.


xmlSecMSCngKeyDataGetPubKey

void * xmlSecMSCngKeyDataGetPubKey(xmlSecKeyDataPtr data);

Source: include/xmlsec/mscng/certkeys.h

Native MSCng public key retrieval from xmlsec keydata. The returned key must.

Parameters:

  • data — the key data to retrieve certificate from. not be destroyed by the caller.

Returns: key on success or 0 otherwise.


xmlSecMSCngKeyDataGetPrivKey

void * xmlSecMSCngKeyDataGetPrivKey(xmlSecKeyDataPtr data);

Source: include/xmlsec/mscng/certkeys.h

Native MSCng private key retrieval from xmlsec keydata. The returned key.

Parameters:

  • data — the key data to retrieve certificate from. must not be destroyed by the caller.

Returns: key on success or 0 otherwise.


Clone this wiki locally