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

Name

Description

s

Existing ASN1_TIME to reuse, or NULL to allocate.

t

Base POSIX time before applying offsets.

offset_day

Days to add (may be negative).

offset_sec

Seconds to add after offset_day (may be negative).

Created with MrDocs