DragonFly On-Line Manual Pages

Search: Section:  


X509_CMP_TIME(3)      DragonFly Library Functions Manual      X509_CMP_TIME(3)

NAME

X509_cmp_time, X509_cmp_current_time, X509_time_adj_ex, X509_time_adj -- ASN.1 Time utilities

SYNOPSIS

#include <openssl/x509.h> int X509_cmp_time(const ASN1_TIME *asn1_time, time_t *cmp_time); int X509_cmp_current_time(const ASN1_TIME *asn1_time); ASN1_TIME * X509_time_adj_ex(ASN1_TIME *asn1_time, int offset_day, long offset_sec, time_t *in_tm); ASN1_TIME * X509_time_adj(ASN1_TIME *asn1_time, long offset_sec, time_t *in_tm);

DESCRIPTION

X509_cmp_time() parses asn1_time with ASN1_time_parse(3) and compares it to cmp_time. X509_cmp_current_time() compares it to the current time. X509_time_adj_ex() sets asn1_time to a time offset_day and offset_sec later than in_tm. X509_time_adj() does the same with a 0 day offset. If asn1_time is NULL, a new ASN1_TIME structure is allocated and returned. In all functions, if in_tm is NULL, the current time is used.

RETURN VALUES

X509_cmp_time() and X509_cmp_current_time() return -1 if asn1_time is earlier than or equal to cmp_time, 1 if it is later, or 0 on error. X509_time_adj_ex() and X509_time_adj() return a pointer to the updated ASN1_TIME structure or NULL on error.

SEE ALSO

ASN1_time_parse(3), time(3)

HISTORY

X509_cmp_current_time() first appeared in SSLeay 0.6.0 and has been available since OpenBSD 2.4. X509_cmp_time() and X509_time_adj() first appeared in OpenSSL 0.9.6 and have been available since OpenBSD 2.9. X509_time_adj_ex() first appeared in OpenSSL 1.0.0 and has been available since OpenBSD 4.9. DragonFly 5.5 March 27, 2018 DragonFly 5.5

Search: Section: