The CertVerifyTimeValidity function verifies the time validity of a certificate.
#include <wincrypt.h>
LONG WINAPI CertVerifyTimeValidity(
LPFILETIME pTimeToVerify, // in
PCERT_INFO pCertInfo // in
);
Returns a minus one if the time being verified is before "NotBefore". Returns a plus one if the time being verified is after "NotAfter". Returns zero for valid time for the certificate.
See Certificate Management Example Code.
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, CertVerifyCRLRevocation, CertVerifyValidityNesting