IX509CertificateRequestCertificate::put_NotAfter method (certenroll.h)
The NotAfter property specifies or retrieves the date and time after which the certificate is no longer valid.
This property is read/write.
Syntax
HRESULT put_NotAfter(
DATE Value
);
Parameters
Value
Return value
None
Remarks
The expiration date is stored as an 8-byte real value that represents a Coordinated Universal Time (Greenwich Mean Time) value between January 1, 1900 and December 31, 9999, inclusive. The value 2.0 represents January 1, 1900; 3.0 represents January 2, 1900. Adding 1 to the value increments the date by a day. The fractional part of the value represents the time of day. Therefore, 2.5 represents 12:00 on January 1, 1900; 3.25 represents 06:00 on January 2, 1900.
For dates between 1950 and 2049 inclusive, the date and time is encoded Coordinated Universal Time in the form YYMMDDHHMMSS. For dates before 1950 or after 2049, encoded generalized time is used. Encoded generalized time is in the form YYYYMMDDHHMMSSMMM, using a four digit year, and is precise to milliseconds. The NotAfter time is, however, only precise to seconds.
After calling Encode, the default value equals the NotBefore property value plus one year plus ten minutes to compensate for clock skew. Typically, this value is adjusted by time zone and daylight saving time, if applicable, before it is displayed.
You must initialize the request object before calling this property. For more information, see any of the following methods:
- Initialize
- InitializeDecode
- InitializeFromCertificate
- InitializeFromPrivateKey
- InitializeFromPublicKey
- InitializeFromTemplateName
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 |