ASN1_TIME_adj

Set an ASN.1 Time to t plus a day/second offset (UTCTime or GeneralizedTime).

Synopsis

Declared in <openssl/asn1.h>

ASN1_TIME*
ASN1_TIME_adj(
    ASN1_TIME* s,
    time_t t,
    int offset_day,
    long offset_sec);

Return Value

The resulting ASN1_TIME (possibly newly allocated), or NULL on error.

Parameters

NameDescription
sExisting ASN1_TIME to reuse, or NULL to allocate.
tBase POSIX time before applying offsets.
offset_dayDays to add (may be negative).
offset_secSeconds to add after offset_day (may be negative).