ASN1_TIME_set_string

Set an ASN.1 time from an ASN.1 time string (UTCTime or GeneralizedTime form).

Synopsis

Declared in <openssl/asn1.h>

int
ASN1_TIME_set_string(
    ASN1_TIME* s,
    char const* str);

Return Value

1 on success, or 0 if the string is not a valid ASN.1 time.

Parameters

NameDescription
sDestination time, or NULL to only validate str.
strNUL-terminated time string such as YYMMDDHHMMSSZ or YYYYMMDDHHMMSSZ.