CertVerifyTimeValidity function

The CertVerifyTimeValidity function verifies the time validity of a certificate.

Syntax

LONG CertVerifyTimeValidity(
  LPFILETIME pTimeToVerify,
  PCERT_INFO pCertInfo
);

Parameters

pTimeToVerify

A pointer to a FILETIME structure containing the comparison time. If NULL, the current time is used.

pCertInfo

A pointer to the CERT_INFO structure of the certificate for which the time is being verified.

Return Value

Returns a minus one if the comparison time is before the NotBefore member of the CERT_INFO structure. Returns a plus one if the comparison time is after the NotAfter member. Returns zero for valid time for the certificate.

Requirements

   
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header wincrypt.h
Library Crypt32.lib
DLL Crypt32.dll

See Also

CertVerifyCRLRevocation

CertVerifyCRLTimeValidity

CertVerifyValidityNesting

Data Management Functions