summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/X509_cmp_time.367
1 files changed, 60 insertions, 7 deletions
diff --git a/src/lib/libcrypto/man/X509_cmp_time.3 b/src/lib/libcrypto/man/X509_cmp_time.3
index 134cb10de3..53ed122824 100644
--- a/src/lib/libcrypto/man/X509_cmp_time.3
+++ b/src/lib/libcrypto/man/X509_cmp_time.3
@@ -1,5 +1,5 @@
1.\" $OpenBSD: X509_cmp_time.3,v 1.3 2017/03/27 17:00:54 jmc Exp $ 1.\" $OpenBSD: X509_cmp_time.3,v 1.4 2017/04/10 17:14:44 schwarze Exp $
2.\" OpenSSL X509_cmp_time.pod 80770da3 Feb 17 19:00:15 2017 +0100 2.\" OpenSSL X509_cmp_time.pod 24053693 Mar 28 14:27:37 2017 +0200
3.\" 3.\"
4.\" This file was written by Emilia Kasper <emilia@openssl.org> 4.\" This file was written by Emilia Kasper <emilia@openssl.org>
5.\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. 5.\" Copyright (c) 2017 The OpenSSL Project. All rights reserved.
@@ -48,12 +48,15 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 49.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 50.\"
51.Dd $Mdocdate: March 27 2017 $ 51.Dd $Mdocdate: April 10 2017 $
52.Dt X509_CMP_TIME 3 52.Dt X509_CMP_TIME 3
53.Os 53.Os
54.Sh NAME 54.Sh NAME
55.Nm X509_cmp_time 55.Nm X509_cmp_time ,
56.Nd compare an ASN.1 Time to a time in seconds since the Epoch 56.Nm X509_cmp_current_time ,
57.Nm X509_time_adj_ex ,
58.Nm X509_time_adj
59.Nd ASN.1 Time utilities
57.Sh SYNOPSIS 60.Sh SYNOPSIS
58.In openssl/x509.h 61.In openssl/x509.h
59.Ft int 62.Ft int
@@ -61,6 +64,23 @@
61.Fa "const ASN1_TIME *asn1_time" 64.Fa "const ASN1_TIME *asn1_time"
62.Fa "time_t *cmp_time" 65.Fa "time_t *cmp_time"
63.Fc 66.Fc
67.Ft int
68.Fo X509_cmp_current_time
69.Fa "const ASN1_TIME *asn1_time"
70.Fc
71.Ft ASN1_TIME *
72.Fo X509_time_adj_ex
73.Fa "ASN1_TIME *asn1_time"
74.Fa "int offset_day"
75.Fa "long offset_sec"
76.Fa "time_t *in_tm"
77.Fc
78.Ft ASN1_TIME *
79.Fo X509_time_adj
80.Fa "ASN1_TIME *asn1_time"
81.Fa "long offset_sec"
82.Fa "time_t *in_tm"
83.Fc
64.Sh DESCRIPTION 84.Sh DESCRIPTION
65.Fn X509_cmp_time 85.Fn X509_cmp_time
66parses 86parses
@@ -69,18 +89,51 @@ with
69.Xr ASN1_time_parse 3 89.Xr ASN1_time_parse 3
70and compares it to 90and compares it to
71.Fa cmp_time . 91.Fa cmp_time .
92.Fn X509_cmp_current_time
93compares it to the current time.
94.Pp
95.Fn X509_time_adj_ex
96sets
97.Fa asn1_time
98to a time
99.Fa offset_day
100and
101.Fa offset_sec
102later than
103.Fa in_tm .
104.Fn X509_time_adj
105does the same with a 0 day offset.
72If 106If
73.Fa cmp_time 107.Fa asn1_time
108is
109.Dv NULL ,
110a new
111.Vt ASN1_TIME
112structure is allocated and returned.
113.Pp
114In all functions, if
115.Fa in_tm
74is 116is
75.Dv NULL , 117.Dv NULL ,
76the current time is used. 118the current time is used.
77.Sh RETURN VALUES 119.Sh RETURN VALUES
78.Fn X509_cmp_time 120.Fn X509_cmp_time
79returns -1 if 121and
122.Fn X509_cmp_current_time
123return -1 if
80.Fa asn1_time 124.Fa asn1_time
81is earlier than or equal to 125is earlier than or equal to
82.Fa cmp_time , 126.Fa cmp_time ,
831 if it is later, or 0 on error. 1271 if it is later, or 0 on error.
128.Pp
129.Fn X509_time_adj_ex
130and
131.Fn X509_time_adj
132return a pointer to the updated
133.Vt ASN1_TIME
134structure or
135.Dv NULL
136on error.
84.Sh SEE ALSO 137.Sh SEE ALSO
85.Xr ASN1_time_parse 3 , 138.Xr ASN1_time_parse 3 ,
86.Xr time 3 139.Xr time 3