Sortix cisortix manual
This manual documents Sortix cisortix. You can instead view this document in the latest official manual.
NAME
ASN1_time_parse, ASN1_time_tm_cmp, ASN1_TIME_set_tm — LibreSSL utilities for ASN.1 time typesSYNOPSIS
#include <openssl/asn1.h>ASN1_time_parse(const char *bytes, size_t len, struct tm *tm, int mode);
ASN1_time_tm_cmp(struct tm *tm1, struct tm *tm2);
ASN1_TIME_set_tm(ASN1_TIME *s, struct tm *tm);
DESCRIPTION
The ASN1_time_parse() function parses an ASN.1 time string of len bytes starting at bytes. The resulting time is stored in tm if tm is not NULL.- 0 to parse a time as specified in RFC 5280 for an X509 object, which may be either a UTC time or a Generalized time.
- V_ASN1_UTCTIME to parse an RFC 5280 format UTC time.
- V_ASN1_GENERALIZEDTIME to parse an RFC 5280 format Generalized time.
RETURN VALUES
ASN1_time_parse() returns- -1 if the string was invalid for the mode specified.
- V_ASN1_UTCTIME if the string parsed as a valid UTC time.
- V_ASN1_GENERALIZEDTIME if the string parsed as a valid Generalized time.
- -1 if tm1 is less than tm2.
- 1 if tm1 is greater than tm2.
- 0 if tm1 is the same as tm2.