5 X509_cmp_time, X509_cmp_current_time, X509_time_adj, X509_time_adj_ex
10 int X509_cmp_time(const ASN1_TIME *asn1_time, time_t *in_tm);
11 int X509_cmp_current_time(const ASN1_TIME *asn1_time);
12 ASN1_TIME *X509_time_adj(ASN1_TIME *asn1_time, long offset_sec, time_t *in_tm);
13 ASN1_TIME *X509_time_adj_ex(ASN1_TIME *asn1_time, int offset_day, long
14 offset_sec, time_t *in_tm);
18 X509_cmp_time() compares the ASN1_TIME in B<asn1_time> with the time
19 in <cmp_time>. X509_cmp_current_time() compares the ASN1_TIME in
20 B<asn1_time> with the current time, expressed as time_t. B<asn1_time>
21 must satisfy the ASN1_TIME format mandated by RFC 5280, i.e., its
22 format must be either YYMMDDHHMMSSZ or YYYYMMDDHHMMSSZ.
24 X509_time_adj_ex() sets the ASN1_TIME structure B<asn1_time> to the time
25 B<offset_day> and B<offset_sec> after B<in_tm>.
27 X509_time_adj() sets the ASN1_TIME structure B<asn1_time> to the time
28 B<offset_sec> after B<in_tm>. This method can only handle second
29 offsets up to the capacity of long, so the newer X509_time_adj_ex()
30 API should be preferred.
32 In both methods, if B<asn1_time> is NULL, a new ASN1_TIME structure
33 is allocated and returned.
35 In all methods, if B<in_tm> is NULL, the current time, expressed as
40 Unlike many standard comparison functions, X509_cmp_time() and
41 X509_cmp_current_time() return 0 on error.
45 X509_cmp_time() and X509_cmp_current_time() return -1 if B<asn1_time>
46 is earlier than, or equal to, B<cmp_time> (resp. current time), and 1
47 otherwise. These methods return 0 on error.
49 X509_time_ad() and X509_time_adj_ex() return a pointer to the updated
50 ASN1_TIME structure, and NULL on error.
54 Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
56 Licensed under the OpenSSL license (the "License"). You may not use
57 this file except in compliance with the License. You can obtain a copy
58 in the file LICENSE in the source distribution or at
59 L<https://www.openssl.org/source/license.html>.