diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/man/ASN1_time_parse.3 | 141 |
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 | ||
34 | The | ||
35 | .Fn ASN1_time_parse | ||
36 | function parses an ASN.1 time string of | ||
37 | .Ar len | ||
38 | bytes starting at | ||
39 | .Ar bytes . | ||
40 | The resulting time is stored in | ||
41 | .Ar tm | ||
42 | if | ||
43 | .Ar tm | ||
44 | is not | ||
45 | .Dv NULL . | ||
46 | .Pp | ||
47 | The | ||
48 | .Ar mode | ||
49 | parameter must be one of | ||
50 | .Bl -bullet -offset four | ||
51 | .It | ||
52 | 0 to parse a time as specified in RFC 5280 for an X509 object, | ||
53 | which may be either a UTC time or a Generalized time. | ||
54 | .It | ||
55 | .Dv V_ASN1_UTCTIME | ||
56 | to parse an RFC 5280 format UTC time. | ||
57 | .It | ||
58 | .Dv V_ASN1_GENERALIZEDTIME | ||
59 | to parse an RFC 5280 format Generalized time. | ||
60 | .El | ||
61 | .Pp | ||
62 | The | ||
63 | .Fn ASN1_time_tm_cmp | ||
64 | function compares two times in | ||
65 | .Ar tm1 | ||
66 | and | ||
67 | .Ar tm2 . | ||
68 | .Pp | ||
69 | The function | ||
70 | .Fn ASN1_TIME_set_tm | ||
71 | sets the | ||
72 | .Vt ASN1_TIME | ||
73 | structure | ||
74 | .Fa s | ||
75 | to the time represented by the | ||
76 | .Vt struct tm | ||
77 | value pointed to by | ||
78 | .Fa tm . | ||
79 | If | ||
80 | .Fa s | ||
81 | is | ||
82 | .Dv NULL , | ||
83 | a new | ||
84 | .Vt ASN1_TIME | ||
85 | structure is allocated and returned. | ||
86 | .Sh RETURN VALUES | ||
87 | .Fn ASN1_time_parse | ||
88 | returns | ||
89 | .Bl -bullet -offset four | ||
90 | .It | ||
91 | -1 if the string was invalid for the | ||
92 | .Ar mode | ||
93 | specified. | ||
94 | .It | ||
95 | .Dv V_ASN1_UTCTIME | ||
96 | if the string parsed as a valid UTC time. | ||
97 | .It | ||
98 | .Dv V_ASN1_GENERALIZEDTIME | ||
99 | if the string parsed as a valid Generalized time. | ||
100 | .El | ||
101 | .Pp | ||
102 | .Fn ASN1_time_tm_cmp | ||
103 | returns | ||
104 | .Bl -bullet -offset four | ||
105 | .It | ||
106 | -1 if | ||
107 | .Ar tm1 | ||
108 | is less than | ||
109 | .Ar tm2 . | ||
110 | .It | ||
111 | 1 if | ||
112 | .Ar tm1 | ||
113 | is greater than | ||
114 | .Ar tm2 . | ||
115 | .It | ||
116 | 0 if | ||
117 | .Ar tm1 | ||
118 | is the same as | ||
119 | .Ar tm2 . | ||
120 | .El | ||
121 | .Pp | ||
122 | .Fn ASN1_TIME_set_tm | ||
123 | returns a pointer to an | ||
124 | .Vt ASN1_TIME | ||
125 | structure or | ||
126 | .Dv NULL | ||
127 | if 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 | ||
134 | and | ||
135 | .Fn ASN1_time_tm_cmp | ||
136 | first appeared in | ||
137 | .Ox 6.1 | ||
138 | and | ||
139 | .Fn ASN1_TIME_set_tm | ||
140 | in | ||
141 | .Ox 6.2 . | ||