Helper Functions

There are a number of helper functions that are provided to make the task of managing certificates easier. They are listed in the following table, and details about them can be found in Certificate Helper Functions.

Function Description
CertAlgIdToOID Converts the CSP algorithm identifier to the ASN.1 Object Identifier string.
CertCompareCertificate Compares two certificates to determine whether they are identical.
CertCompareCertificateName Compares two certificate names to determine whether they are identical.
CertCompareIntegerBlob Compares two integer blobs.
CertComparePublicKeyInfo Compares two public keys to determine whether they are identical.
CertFindAttribute Finds the first attribute identified by its Object Identifier.
CertFindExtension Finds the first extension identified by its Object Identifier.
CertFindRDNAttr Finds the first RDN attribute identified by its Object Identifier in the name list of the Relative Distinguished Names.
CertGetIntendedKeyUsage Gets the intended key usage bytes from the certificate.
CertIsRDNAttrsInCertificateName Compares the attributes in the certificate name with the specified RDN's array of attributes to determine whether all attributes are included there.
CertNameToStr Converts a certificate name blob to a zero terminated string.
CertOIDToAlgId Converts the ASN.1 Object Identifier string to the CSP algorithm identifier.
CertRDNValueToStr Converts a Name Value to a null-terminated string.
CertVerifyCRLRevocation Verifies that the subject certificate is not on the CRL.
CertVerifyCRLTimeValidity Verifies the time validity of a CRL.
CertVerifyRevocation Verifies the subject certificate is not on the CRL.
CertVerifyTimeValidity Verifies the time validity of a certificate.
CertVerifyValidityNesting Verifies that the subject's time validity nests within the issuer's time validity.
CryptExportPublicKeyInfo Exports the public key information associated with the provider's corresponding private key.
CryptExportPublicKeyInfoEx Exports the public key information associated with the provider's corresponding private key. This function differs from CryptExportPublicKeyInfo in that the user can specify the public key algorithm, overriding the default provided by the CSP.
CryptHashCertificate Hashes the encoded content.
CryptHashPublicKeyInfo Computes the hash of the encoded public key info.
CryptHashToBeSigned Computes the hash of the "to be signed" information in the encoded signed content (CERT_SIGNED_CONTENT_INFO).
CryptImportPublicKeyInfo Converts and imports the public key info into the provider and return a handle to the public key.
CryptImportPublicKeyInfoEx Converts and imports the public key information into the provider and returns a handle to the public key. Additional parameters (over those specified by CryptImportPublicKeyInfo) that can be used to override defaults are provided to supplement the CERT_PUBLIC_KEY_INFO.
CryptSignAndEncodeCertificate Encodes the "to be signed" information, signs this encoded information, and. encodes the resulting signed encoded information.
CryptSignCertificate Signs the "to be signed" information in the encoded signed content.
CryptVerifyCertificateSignature Verifies the signature of a subject certificate or a CRL using the public key info.