IX509CertificateRequestCertificate::CheckPublicKeySignature method (certenroll.h)

The CheckPublicKeySignature method verifies the certificate signature by using the public key of the signing certificate.

Syntax

HRESULT CheckPublicKeySignature(
  [in] IX509PublicKey *pPublicKey
);

Parameters

[in] pPublicKey

Pointer to an IX509PublicKey interface that represents the public key.

Return value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.

Return code/value Description
CRYPT_E_NO_SIGNER
The signature cannot be found.
HRESULT_FROM_WIN32(ERROR_INVALID_STATE)
The IX509PublicKey object has not been initialized.
OLE_E_BLANK
The request object has not been initialized.

Remarks

This method decrypts the signature and compares it to a hash of the certificate, using the hash algorithm specified by the signature. You must initialize the request object before calling this property. For more information, see any of the following methods:

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header certenroll.h
DLL CertEnroll.dll

See also

IX509CertificateRequestCertificate