summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/X509_get0_notBefore.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/X509_get0_notBefore.3')
-rw-r--r--src/lib/libcrypto/man/X509_get0_notBefore.3259
1 files changed, 0 insertions, 259 deletions
diff --git a/src/lib/libcrypto/man/X509_get0_notBefore.3 b/src/lib/libcrypto/man/X509_get0_notBefore.3
deleted file mode 100644
index e9f0d62992..0000000000
--- a/src/lib/libcrypto/man/X509_get0_notBefore.3
+++ /dev/null
@@ -1,259 +0,0 @@
1.\" $OpenBSD: X509_get0_notBefore.3,v 1.5 2020/06/24 14:59:41 schwarze Exp $
2.\" content checked up to: OpenSSL 27b138e9 May 19 00:16:38 2017 +0000
3.\"
4.\" Copyright (c) 2018, 2020 Ingo Schwarze <schwarze@openbsd.org>
5.\"
6.\" Permission to use, copy, modify, and distribute this software for any
7.\" purpose with or without fee is hereby granted, provided that the above
8.\" copyright notice and this permission notice appear in all copies.
9.\"
10.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17.\"
18.Dd $Mdocdate: June 24 2020 $
19.Dt X509_GET0_NOTBEFORE 3
20.Os
21.Sh NAME
22.Nm X509_get0_notBefore ,
23.Nm X509_get0_notAfter ,
24.Nm X509_getm_notBefore ,
25.Nm X509_getm_notAfter ,
26.Nm X509_get_notBefore ,
27.Nm X509_get_notAfter ,
28.Nm X509_CRL_get0_lastUpdate ,
29.Nm X509_CRL_get0_nextUpdate ,
30.Nm X509_CRL_get_lastUpdate ,
31.Nm X509_CRL_get_nextUpdate ,
32.Nm X509_set1_notBefore ,
33.Nm X509_set1_notAfter ,
34.Nm X509_set_notBefore ,
35.Nm X509_set_notAfter ,
36.Nm X509_CRL_set1_lastUpdate ,
37.Nm X509_CRL_set1_nextUpdate ,
38.Nm X509_CRL_set_lastUpdate ,
39.Nm X509_CRL_set_nextUpdate
40.Nd get and set certificate and CRL validity dates
41.Sh SYNOPSIS
42.In openssl/x509.h
43.Ft const ASN1_TIME *
44.Fo X509_get0_notBefore
45.Fa "const X509 *x"
46.Fc
47.Ft const ASN1_TIME *
48.Fo X509_get0_notAfter
49.Fa "const X509 *x"
50.Fc
51.Ft ASN1_TIME *
52.Fo X509_getm_notBefore
53.Fa "const X509 *x"
54.Fc
55.Ft ASN1_TIME *
56.Fo X509_getm_notAfter
57.Fa "const X509 *x"
58.Fc
59.Ft ASN1_TIME *
60.Fo X509_get_notBefore
61.Fa "const X509 *x"
62.Fc
63.Ft ASN1_TIME *
64.Fo X509_get_notAfter
65.Fa "const X509 *x"
66.Fc
67.Ft const ASN1_TIME *
68.Fo X509_CRL_get0_lastUpdate
69.Fa "const X509_CRL *crl"
70.Fc
71.Ft const ASN1_TIME *
72.Fo X509_CRL_get0_nextUpdate
73.Fa "const X509_CRL *crl"
74.Fc
75.Ft ASN1_TIME *
76.Fo X509_CRL_get_lastUpdate
77.Fa "X509_CRL *crl"
78.Fc
79.Ft ASN1_TIME *
80.Fo X509_CRL_get_nextUpdate
81.Fa "X509_CRL *crl"
82.Fc
83.Ft int
84.Fo X509_set1_notBefore
85.Fa "X509 *x"
86.Fa "const ASN1_TIME *tm"
87.Fc
88.Ft int
89.Fo X509_set1_notAfter
90.Fa "X509 *x"
91.Fa "const ASN1_TIME *tm"
92.Fc
93.Ft int
94.Fo X509_set_notBefore
95.Fa "X509 *x"
96.Fa "const ASN1_TIME *tm"
97.Fc
98.Ft int
99.Fo X509_set_notAfter
100.Fa "X509 *x"
101.Fa "const ASN1_TIME *tm"
102.Fc
103.Ft int
104.Fo X509_CRL_set1_lastUpdate
105.Fa "X509_CRL *crl"
106.Fa "const ASN1_TIME *tm"
107.Fc
108.Ft int
109.Fo X509_CRL_set1_nextUpdate
110.Fa "X509_CRL *crl"
111.Fa "const ASN1_TIME *tm"
112.Fc
113.Ft int
114.Fo X509_CRL_set_lastUpdate
115.Fa "X509_CRL *crl"
116.Fa "const ASN1_TIME *tm"
117.Fc
118.Ft int
119.Fo X509_CRL_set_nextUpdate
120.Fa "X509_CRL *crl"
121.Fa "const ASN1_TIME *tm"
122.Fc
123.Sh DESCRIPTION
124.Fn X509_getm_notBefore
125and
126.Fn X509_getm_notAfter
127return pointers to the
128.Fa notBefore
129and
130.Fa notAfter
131fields of the validity period of the certificate
132.Fa x ,
133respectively.
134.Fn X509_get_notBefore
135and
136.Fn X509_get_notAfter
137are deprecated aliases implemented as macros.
138.Pp
139.Fn X509_get0_notBefore
140and
141.Fn X509_get0_notAfter
142are identical except for the const qualifier on the return type.
143.Pp
144.Fn X509_CRL_get0_lastUpdate
145and
146.Fn X509_CRL_get0_nextUpdate
147return pointers to the
148.Fa lastUpdate
149and
150.Fa nextUpdate
151fields of
152.Fa crl .
153.Pp
154.Fn X509_CRL_get_lastUpdate
155and
156.Fn X509_CRL_get_nextUpdate
157are deprecated and identical except for the const qualifier
158on the argument and on the return type.
159.Pp
160.Fn X509_set1_notBefore ,
161.Fn X509_set1_notAfter ,
162.Fn X509_CRL_set1_lastUpdate ,
163and
164.Fn X509_CRL_set1_nextUpdate
165set the
166.Fa notBefore ,
167.Fa notAfter ,
168.Fa lastUpdate ,
169or
170.Fa nextUpdate
171field of
172.Fa x
173or
174.Fa crl ,
175respectively, to a deep copy of
176.Fa tm
177and free the
178.Vt ASN1_TIME
179value that they replace.
180.Pp
181.Fn X509_set_notBefore ,
182.Fn X509_set_notAfter ,
183.Fn X509_CRL_set_lastUpdate ,
184and
185.Fn X509_CRL_set_nextUpdate
186are deprecated aliases.
187.Sh RETURN VALUES
188The
189.Sy get
190functions return internal pointers
191which must not be freed by the application, or
192.Dv NULL
193if the requested field is not available.
194They may crash with a
195.Dv NULL
196pointer access if
197.Fa x
198or
199.Fa crl
200is
201.Dv NULL .
202.Pp
203The
204.Sy set
205functions return 1 on success or 0 on failure.
206They fail if
207.Fa x
208is
209.Dv NULL
210or does not contain a
211.Fa validity
212substructure, if
213.Fa crl
214is
215.Dv NULL ,
216or if
217.Xr ASN1_STRING_dup 3
218fails.
219.Pp
220Except for some cases of
221.Xr ASN1_STRING_dup 3
222failure, these functions do not support
223determining reasons for failure with
224.Xr ERR_get_error 3 .
225.Sh SEE ALSO
226.Xr ASN1_TIME_set 3 ,
227.Xr ASN1_TIME_set_tm 3 ,
228.Xr X509_cmp_time 3 ,
229.Xr X509_CRL_get0_by_serial 3 ,
230.Xr X509_CRL_new 3 ,
231.Xr X509_get_subject_name 3 ,
232.Xr X509_new 3 ,
233.Xr X509_sign 3 ,
234.Xr X509_VAL_new 3 ,
235.Xr X509_verify_cert 3
236.Sh HISTORY
237.Fn X509_get_notBefore ,
238.Fn X509_get_notAfter ,
239.Fn X509_set_notBefore ,
240and
241.Fn X509_set_notAfter
242first appeared in SSLeay 0.6.5 and have been available since
243.Ox 2.4 .
244.Pp
245.Fn X509_CRL_get_lastUpdate
246and
247.Fn X509_CRL_get_nextUpdate
248first appeared in OpenSSL 0.9.2 and have been available since
249.Ox 2.6 .
250.Pp
251.Fn X509_CRL_set_lastUpdate
252and
253.Fn X509_CRL_set_nextUpdate
254first appeared in OpenSSL 0.9.7 and have been available since
255.Ox 3.2 .
256.Pp
257The remaining functions first appeared in OpenSSL 1.1.0
258and have been available since
259.Ox 6.3 .