summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/ASN1_time_parse.3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/man/ASN1_time_parse.3141
1 files changed, 0 insertions, 141 deletions
diff --git a/src/lib/libcrypto/man/ASN1_time_parse.3 b/src/lib/libcrypto/man/ASN1_time_parse.3
deleted file mode 100644
index 6ec45e5dcc..0000000000
--- a/src/lib/libcrypto/man/ASN1_time_parse.3
+++ /dev/null
@@ -1,141 +0,0 @@
1.\" $OpenBSD: ASN1_time_parse.3,v 1.9 2020/11/02 17:45:35 tb Exp $
2.\"
3.\" Copyright (c) 2016 Bob Beck <beck@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: November 2 2020 $
18.Dt ASN1_TIME_PARSE 3
19.Os
20.Sh NAME
21.Nm ASN1_time_parse ,
22.Nm ASN1_time_tm_cmp ,
23.Nm ASN1_TIME_set_tm
24.Nd LibreSSL utilities for ASN.1 time types
25.Sh SYNOPSIS
26.In openssl/asn1.h
27.Ft int
28.Fn ASN1_time_parse "const char *bytes" "size_t len" "struct tm *tm" "int mode"
29.Ft int
30.Fn ASN1_time_tm_cmp "struct tm *tm1" "struct tm *tm2"
31.Ft ASN1_TIME *
32.Fn ASN1_TIME_set_tm "ASN1_TIME *s" "struct tm *tm"
33.Sh DESCRIPTION
34The
35.Fn ASN1_time_parse
36function parses an ASN.1 time string of
37.Ar len
38bytes starting at
39.Ar bytes .
40The resulting time is stored in
41.Ar tm
42if
43.Ar tm
44is not
45.Dv NULL .
46.Pp
47The
48.Ar mode
49parameter must be one of
50.Bl -bullet -offset four
51.It
520 to parse a time as specified in RFC 5280 for an X509 object,
53which may be either a UTC time or a Generalized time.
54.It
55.Dv V_ASN1_UTCTIME
56to parse an RFC 5280 format UTC time.
57.It
58.Dv V_ASN1_GENERALIZEDTIME
59to parse an RFC 5280 format Generalized time.
60.El
61.Pp
62The
63.Fn ASN1_time_tm_cmp
64function compares two times in
65.Ar tm1
66and
67.Ar tm2 .
68.Pp
69The function
70.Fn ASN1_TIME_set_tm
71sets the
72.Vt ASN1_TIME
73structure
74.Fa s
75to the time represented by the
76.Vt struct tm
77value pointed to by
78.Fa tm .
79If
80.Fa s
81is
82.Dv NULL ,
83a new
84.Vt ASN1_TIME
85structure is allocated and returned.
86.Sh RETURN VALUES
87.Fn ASN1_time_parse
88returns
89.Bl -bullet -offset four
90.It
91-1 if the string was invalid for the
92.Ar mode
93specified.
94.It
95.Dv V_ASN1_UTCTIME
96if the string parsed as a valid UTC time.
97.It
98.Dv V_ASN1_GENERALIZEDTIME
99if the string parsed as a valid Generalized time.
100.El
101.Pp
102.Fn ASN1_time_tm_cmp
103returns
104.Bl -bullet -offset four
105.It
106-1 if
107.Ar tm1
108is less than
109.Ar tm2 .
110.It
1111 if
112.Ar tm1
113is greater than
114.Ar tm2 .
115.It
1160 if
117.Ar tm1
118is the same as
119.Ar tm2 .
120.El
121.Pp
122.Fn ASN1_TIME_set_tm
123returns a pointer to an
124.Vt ASN1_TIME
125structure or
126.Dv NULL
127if an error occurred.
128.Sh SEE ALSO
129.Xr ASN1_TIME_new 3 ,
130.Xr ASN1_TIME_set 3 ,
131.Xr X509_cmp_time 3
132.Sh HISTORY
133.Fn ASN1_time_parse
134and
135.Fn ASN1_time_tm_cmp
136first appeared in
137.Ox 6.1
138and
139.Fn ASN1_TIME_set_tm
140in
141.Ox 6.2 .