The CertVerifyCRLRevocation function verifies that the subject certificate is not on the CRL.
#include <wincrypt.h>
BOOL WINAPI CertVerifyCRLRevocation(
DWORD dwCertEncodingType, // in
PCERT_INFO pCertId, // in
DWORD cCrlInfo, // in
PCRL_INFO rgpCrlInfo // in
);
Encoding type | Value |
---|---|
X509_ASN_ENCODING | 0x00000001 |
Returns TRUE if the certificate is not on the CRL.
// EXAMPLE CODE FOR USING CertVerifyCRLRevocation() to
// verify whether a subject certificate is on a CRL.
// Assume that a pointer to the certificate (pCertId) for which the
// revocation verification is to be performed is already known, that
// the type of encoding used on the certificate is X509_ASN_ENCODING,
// and that the array of CRL_INFO pointers has already been
// constructed (in rgpCrlInfo) and that it has 5 elements.
// Set up the variables.
PCERT_INFO pCertId; // Initialized elsewhere
PCRL_INFO rgpCrlInfo[5]; // Initialized elsewhere
BOOL Return;
Return = CertVerifyCRLRevocation(
X509_ASN_ENCODING, pCertId, 5, rgpCrlInfo);
if (Return == TRUE) {
// The certificate is not on the CRL. Continue as desired.
}
Windows NT: Requires version 4.0 SP3 or later. Available also in IE 3.02 and later.
Windows: Requires Windows 98 (or Windows 95 with IE 3.02 or later).
Windows CE: Unsupported.
Header: Declared in wincrypt.h.
Import Library: Use crypt32.lib.
CertVerifyCRLTimeValidity, CertVerifyTimeValidity, CertVerifyValidityNesting