Share via


Certificates Functions (Compact 2013)

3/28/2014

The following tables list the complete set of functions exposed by Certificate Services.

Programming element

Description

CertAddCertificateContextToStore

This function adds a certificate context to the certificate store.

CertAddCertificateLinkToStore

This function adds a link in a certificate store to a certificate context in a different store.

CertAddEncodedCertificateToStore

This function creates a certificate context from an encoded certificate and adds it to the certificate store.

CertAddEnhancedKeyUsageIdentifier

This function adds a usage identifier object identifier (OID) to the certificate's extended key usage (EKU) property.

CertAddSerializedElementToStore

This function adds a serialized certificate element to the store.

CertAddStoreToCollection

This function adds a sibling certificate store to a collection certificate store.

CertAlgIdToOID

This function converts a CryptoAPI algorithm identifier (ALG_ID) to an ASN.1 object identifier string.

CertCloseStore

This function closes a certificate store handle and reduces the reference count on the store.

CertCompareCertificate

This function compares two certificates to determine whether they are identical.

CertCompareCertificateName

This function compares two certificate BLOB (Cryptography) structures to determine whether they are identical.

CertCompareIntegerBlob

This function compares two integer BLOB (Cryptography) structures to determine whether they represent equal numeric values.

CertComparePublicKeyInfo

This function compares two encoded public keys to determine whether they are identical.

CertControlStore

This function allows an application to be notified when there is a difference between the contents of a cached store in use and the contents of that store as it is persisted to storage.

CertCreateCertificateContext

This function creates a certificate context from an encoded certificate.

CertDeleteCertificateFromStore

This function deletes the specified certificate context from the certificate store.

CertDuplicateCertificateChain

This function duplicates a pointer to a certificate chain by incrementing the chain's reference count.

CertDuplicateCertificateContext

This function duplicates a certificate context by incrementing its reference count.

CertDuplicateStore

This function duplicates a store handle by incrementing the store's reference count.

CertEnumCertificateContextProperties

This function retrieves the first or next extended property associated with a certificate context.

CertEnumCertificatesInStore

This function retrieves the first or next certificate in a certificate store.

CertEnumPhysicalStore

This function retrieves the physical stores on a computer.

CertEnumSystemStore

This function retrieves the first or next system store available.

CertEnumSystemStoreLocation

This function retrieves the first or next system store location.

CertFindAttribute

This function finds the first attribute in the CRYPT_ATTRIBUTE array, as identified by its OID.

CertFindCertificateInStore

This function finds the first or next certificate context in a certificate store that matches search criteria established by the dwFindType parameter and its associated pvFindPara parameter.

CertFindExtension

This function finds the first extension in the CERT_EXTENSION array, as identified by its OID.

CertFindRDNAttr

This function finds the first relative distinguished name (RDN) attribute identified by its OID in an RDN list.

CertFreeCertificateChain

This function frees a certificate chain by reducing its reference count.

CertFreeCertificateContext

This function frees a certificate context by decrementing its reference count.

CertGetCertificateChain

This function builds a certificate chain context starting from an end certificate and going back, if possible, to a trusted root certificate.

CertGetCertificateContextProperty

This function retrieves the information contained in an extended property of a certificate context.

CertGetEnhancedKeyUsage

This function returns information from the EKU extension or the EKU property of a certificate.

CertGetIntendedKeyUsage

This function acquires the intended key usage bytes from a certificate.

CertGetIssuerCertificateFromStore

This function retrieves the certificate context from the certificate store for the first or next issuer of the specified subject certificate.

CertGetNameString

This function obtains the subject or issuer name from a certificate CERT_CONTEXT structure and converts it to a NULL-terminated character string.

CertGetPublicKeyLength

This function acquires the bit length of public/private keys from a public key BLOB (Cryptography).

CertGetStoreProperty

This function retrieves a store property.

CertGetSubjectCertificateFromStore

This function returns from a certificate store a subject certificate context uniquely identified by its issuer and serial number.

CertGetValidUsages

This function returns an array of usages consisting of the intersection of the valid usages for all certificates in an array of certificates.

CertIsRDNAttrsInCertificateName

This function compares the attributes in the certificate name with the specified CERT_RDN structure to determine whether all attributes are included there.

CertNameToStr

This function converts the name in a BLOB (Cryptography) structure to a NULL-terminated character string.

CertOIDToAlgId

This function converts the ASN.1 OID string to the CryptoAPI algorithm identifier (ALG_ID).

CertOpenStore

This function opens a certificate store using a specified store provider type.

CertOpenSystemStore

This function is a simplified function used to open the most common system certificate store.

CertRDNValueToStr

This function converts a name in a BLOB (Cryptography) structure to a NULL-terminated character string.

CertRemoveEnhancedKeyUsageIdentifier

This function removes a usage identifier OID from the certificate's EKU property.

CertRemoveStoreFromCollection

This function removes a sibling certificate store from a collection store.

CertSaveStore

This function saves the certificate store to a file or to a memory BLOB (Cryptography).

CertSerializeCertificateStoreElement

This function serializes a certificate context's encoded certificate and its encoded properties.

CertSetCertificateContextProperty

This function sets an extended property for a specified certificate context.

CertSetEnhancedKeyUsage

This function sets the EKU property for the certificate.

CertSetStoreProperty

This function sets a store property.

CertStrToName

This function converts a NULL-terminated X500 string to an encoded certificate name.

CertVerifyCertificateChainPolicy

This function checks a certificate chain to verify its validity, including its compliance with any specified validity policy criteria.

CertVerifySubjectCertificateContext

This function performs the enabled verification checks on a certificate by checking the validity of the certificate's issuer.

CertVerifyTimeValidity

This function verifies the time validity of a certificate.

CertVerifyValidityNesting

This function verifies that a subject certificate's time validity nests correctly within its issuer's time validity.

CryptAcquireCertificatePrivateKey

This function acquires a HCRYPTPROV cryptographic service provider (CSP) handle, including access to its related key container and the dwKeySpec parameter for a user's specified certificate context.

CryptCreateKeyIdentifierFromCSP

This function creates a key identifier from a CSP public key BLOB.

CryptDecodeMessage

This function decodes, decrypts, and verifies a cryptographic message.

CryptDecodeObjectEx

This function decodes a structure of the type indicated by the lpszStructType parameter.

CryptDecryptAndVerifyMessageSignature

This function decrypts a message and verifies its signature.

CryptDecryptMessage

This function decodes and decrypts a message.

CryptEncodeObjectEx

This function encodes a structure of the type indicated by the value of the lpszStructType parameter.

CryptEncryptMessage

This function encrypts and encodes a message.

CryptEnumKeyIdentifierProperties

This function enumerates key identifiers and their properties.

CryptEnumOIDInfo

This function enumerates predefined and registered object identifier CRYPT_OID_INFO structures.

CryptExportPublicKeyInfo

This function exports the public key information associated with the provider's corresponding private key.

CryptExportPublicKeyInfoEx

This function exports the public key information associated with the provider's corresponding private key.

CryptFindCertificateKeyProvInfo

This function enumerates the cryptographic providers and their containers to find the private key corresponding to the certificate's public key.

CryptFindOIDInfo

This function retrieves the first predefined or registered CRYPT_OID_INFO structure that matches a specified key type and key.

CryptFreeOIDFunctionAddress

This function frees a handle returned by the CryptGetOIDFunctionAddress or CryptGetDefaultOIDFunctionAddress function by decrementing the reference count on the function handle.

CryptGetDefaultOIDFunctionAddress

This function loads the DLL that contains a default function address.

CryptGetKeyIdentifierProperty

This function acquires a specific property from a specified key identifier.

CryptGetMessageCertificates

This function returns the handle of an open certificate store that contains the message's certificates and certificate revocation lists (CRLs).

CryptGetMessageSignerCount

This function returns the number of signers of a signed message.

CryptGetOIDFunctionAddress

This function searches the list of installed functions for an encoding type and OID match.

CryptHashCertificate

This function hashes the entire encoded content of a certificate including its signature.

CryptHashCertificate2

This function hashes a block of data by using a Cryptographic Next Generation (CNG) hash provider.

CryptHashMessage

This function creates a hash of the message.

CryptHashPublicKeyInfo

This function encodes the public key information in a CERT_PUBLIC_KEY_INFO structure and computes the hash of the encoded bytes.

CryptHashToBeSigned

This function computes the hash of the encoded content from a signed and encoded certificate.

CryptImportPublicKeyInfoEx

This function imports public key information into the CSP and returns a handle of the public key.

CryptImportPublicKeyInfoEx2

This function imports a public key into the CNG asymmetric provider that corresponds to the public key OID and returns a CNG handle to the key.

CryptInitOIDFunctionSet

This function initializes and returns the handle of the OID function set identified by a supplied function set name.

CryptInstallDefaultContext

This function installs a previously acquired HCRYPTPROV context to be used as a default context.

CryptInstallOIDFunctionAddress

This function installs a set of callable OID function addresses.

CryptMsgVerifyCountersignatureEncoded

This function verifies a countersignature in terms of the SignerInfo structure (as defined by PKCS #7).

CryptMsgVerifyCountersignatureEncodedEx

This function verifies that the encrypted hash has been countersigned by the CERT_PUBLIC_KEY_INFO structure, a certificate context, or a chain context.

CryptSetKeyIdentifierProperty

This function sets the property of a specified key identifier.

CryptSignAndEncodeCertificate

This function encodes and signs a certificate or certificate request.

CryptSignAndEncryptMessage

This function creates a hash of the specified content, signs the hash, encrypts the content, hashes the encrypted contents and the signed hash, and then encodes both the encrypted content and the signed hash.

CryptSignCertificate

This function signs the to-be-signed information in the encoded signed content.

CryptSignMessage

This function creates a hash of the specified content, signs the hash, and then encodes both the original message content and the signed hash.

CryptSignMessageWithKey

This function signs a message by using a CSP's private key specified in the parameters. A placeholder SignerId is created and stored in the message.

CryptUninstallDefaultContext

This function removes a default context previously installed by the CryptInstallDefaultContext function

CryptVerifyDetachedMessageHash

This function verifies a detached hash.

CryptVerifyDetachedMessageSignature

This function verifies a signed message that contains a detached signature or signatures.

CryptVerifyMessageHash

This function verifies the hash of the specified content.

CryptVerifyMessageSignature

This function verifies a signed message's signature.

CryptVerifyMessageSignatureWithKey

This function verifies a signed message's signature by using specified public key information.

PFXExportCertStoreEx

This function exports the certificates and, if available, their associated private keys from the referenced certificate store in Personal Information Exchange (PFX) format.

PFX format is also known as Public-Key Cryptography Standards #12 (PKCS #12) format.

PFXImportCertStore

This function imports a PFX BLOB and returns the handle of a store that contains certificates and any associated private keys.

PFXIsPFXBlob

This function attempts to decode the outer layer of a BLOB as a PFX packet.

PFXVerifyPassword

This function attempts to decode the outer layer of a BLOB as a PFX packet and to decrypt it with the given password. No data from the BLOB is imported.

See Also

Reference

Certificates Reference