diff options
Diffstat (limited to 'src/lib/libcrypto/man/X509_OBJECT_get0_X509.3')
-rw-r--r-- | src/lib/libcrypto/man/X509_OBJECT_get0_X509.3 | 252 |
1 files changed, 0 insertions, 252 deletions
diff --git a/src/lib/libcrypto/man/X509_OBJECT_get0_X509.3 b/src/lib/libcrypto/man/X509_OBJECT_get0_X509.3 deleted file mode 100644 index 56b3926a8b..0000000000 --- a/src/lib/libcrypto/man/X509_OBJECT_get0_X509.3 +++ /dev/null | |||
@@ -1,252 +0,0 @@ | |||
1 | .\" $OpenBSD: X509_OBJECT_get0_X509.3,v 1.16 2025/03/08 17:02:59 tb Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2018, 2021 Ingo Schwarze <schwarze@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: March 8 2025 $ | ||
18 | .Dt X509_OBJECT_GET0_X509 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm X509_OBJECT_get_type , | ||
22 | .Nm X509_OBJECT_new , | ||
23 | .Nm X509_OBJECT_free , | ||
24 | .Nm X509_OBJECT_get0_X509 , | ||
25 | .Nm X509_OBJECT_get0_X509_CRL , | ||
26 | .Nm X509_OBJECT_idx_by_subject , | ||
27 | .Nm X509_OBJECT_retrieve_by_subject , | ||
28 | .Nm X509_OBJECT_retrieve_match | ||
29 | .Nd certificate, CRL, private key, and string wrapper for certificate stores | ||
30 | .Sh SYNOPSIS | ||
31 | .In openssl/x509_vfy.h | ||
32 | .Ft X509_LOOKUP_TYPE | ||
33 | .Fo X509_OBJECT_get_type | ||
34 | .Fa "const X509_OBJECT *obj" | ||
35 | .Fc | ||
36 | .Ft X509_OBJECT * | ||
37 | .Fo X509_OBJECT_new | ||
38 | .Fa void | ||
39 | .Fc | ||
40 | .Ft void | ||
41 | .Fo X509_OBJECT_free | ||
42 | .Fa "X509_OBJECT *obj" | ||
43 | .Fc | ||
44 | .Ft X509 * | ||
45 | .Fo X509_OBJECT_get0_X509 | ||
46 | .Fa "const X509_OBJECT *obj" | ||
47 | .Fc | ||
48 | .Ft X509_CRL * | ||
49 | .Fo X509_OBJECT_get0_X509_CRL | ||
50 | .Fa "X509_OBJECT *obj" | ||
51 | .Fc | ||
52 | .Ft int | ||
53 | .Fo X509_OBJECT_idx_by_subject | ||
54 | .Fa "STACK_OF(X509_OBJECT) *stack" | ||
55 | .Fa "X509_LOOKUP_TYPE type" | ||
56 | .Fa "X509_NAME *name" | ||
57 | .Fc | ||
58 | .Ft X509_OBJECT * | ||
59 | .Fo X509_OBJECT_retrieve_by_subject | ||
60 | .Fa "STACK_OF(X509_OBJECT) *stack" | ||
61 | .Fa "X509_LOOKUP_TYPE type" | ||
62 | .Fa "X509_NAME *name" | ||
63 | .Fc | ||
64 | .Ft X509_OBJECT * | ||
65 | .Fo X509_OBJECT_retrieve_match | ||
66 | .Fa "STACK_OF(X509_OBJECT) *stack" | ||
67 | .Fa "X509_OBJECT *obj" | ||
68 | .Fc | ||
69 | .Sh DESCRIPTION | ||
70 | The | ||
71 | .Vt X509_OBJECT | ||
72 | structure is a shallow wrapper around one | ||
73 | .Vt X509 | ||
74 | certificate object or one | ||
75 | .Vt X509_CRL | ||
76 | certificate revocation list object. | ||
77 | The type of object stored at any given time can be inspected with | ||
78 | .Fn X509_OBJECT_get_type . | ||
79 | .Pp | ||
80 | Each | ||
81 | .Vt X509_STORE | ||
82 | object uses one stack of | ||
83 | .Vt X509_OBJECT | ||
84 | structures as its main storage area. | ||
85 | .Pp | ||
86 | .Fn X509_OBJECT_new | ||
87 | allocates a new | ||
88 | .Vt X509_OBJECT | ||
89 | structure. | ||
90 | It sets the object type to | ||
91 | .Dv X509_LU_NONE | ||
92 | and the pointer to the certificate or CRL to | ||
93 | .Dv NULL . | ||
94 | .Pp | ||
95 | If | ||
96 | .Fa obj | ||
97 | contains an | ||
98 | .Vt X509 | ||
99 | certificate, | ||
100 | .Fn X509_OBJECT_free | ||
101 | calls | ||
102 | .Xr X509_free 3 | ||
103 | on that inner object. | ||
104 | If | ||
105 | .Fa obj | ||
106 | contains an | ||
107 | .Vt X509_CRL | ||
108 | certificate revocation list, it calls | ||
109 | .Xr X509_CRL_free 3 | ||
110 | on that inner list. | ||
111 | .Fn X509_OBJECT_free | ||
112 | then frees the storage used for the | ||
113 | .Fa obj | ||
114 | itself. | ||
115 | .Pp | ||
116 | If | ||
117 | .Fa type | ||
118 | is | ||
119 | .Dv X509_LU_X509 , | ||
120 | .Fn X509_OBJECT_idx_by_subject | ||
121 | and | ||
122 | .Fn X509_OBJECT_retrieve_by_subject | ||
123 | search the given | ||
124 | .Fa stack | ||
125 | for a certificate with the subject | ||
126 | .Fa name . | ||
127 | If | ||
128 | .Fa type | ||
129 | is | ||
130 | .Dv X509_LU_CRL , | ||
131 | they search for a certificate revocation list with the issuer | ||
132 | .Fa name | ||
133 | instead. | ||
134 | .Pp | ||
135 | If | ||
136 | .Fa obj | ||
137 | contains a certificate, | ||
138 | .Fn X509_OBJECT_retrieve_match | ||
139 | searches the given | ||
140 | .Fa stack | ||
141 | for a certificate with a matching subject name; | ||
142 | if it contains a certificate revocation list, it searches for a | ||
143 | certificate revocation list with a matching issuer name instead; | ||
144 | otherwise, it searches for an | ||
145 | .Vt X509_OBJECT | ||
146 | with a matching type. | ||
147 | .Sh RETURN VALUES | ||
148 | .Fn X509_OBJECT_get_type | ||
149 | returns | ||
150 | .Dv X509_LU_X509 | ||
151 | if | ||
152 | .Fa obj | ||
153 | contains a certificate, | ||
154 | .Dv X509_LU_CRL | ||
155 | if it contains a certificate revocation list, or | ||
156 | .Dv X509_LU_NONE | ||
157 | if it contains neither. | ||
158 | .Pp | ||
159 | .Fn X509_OBJECT_new | ||
160 | returns the new object or | ||
161 | .Dv NULL | ||
162 | if memory allocation fails. | ||
163 | .Pp | ||
164 | .Fn X509_OBJECT_get0_X509 | ||
165 | returns an internal pointer to the certificate contained in | ||
166 | .Fa obj | ||
167 | or | ||
168 | .Dv NULL | ||
169 | if | ||
170 | .Fa obj | ||
171 | is | ||
172 | .Dv NULL | ||
173 | or contains no certificate. | ||
174 | .Pp | ||
175 | .Fn X509_OBJECT_get0_X509_CRL | ||
176 | returns an internal pointer to the certificate revocation list contained in | ||
177 | .Fa obj | ||
178 | or | ||
179 | .Dv NULL | ||
180 | if | ||
181 | .Fa obj | ||
182 | is | ||
183 | .Dv NULL | ||
184 | or contains no certificate revocation list. | ||
185 | .Pp | ||
186 | .Fn X509_OBJECT_idx_by_subject | ||
187 | returns the zero-based index of the first matching certificate | ||
188 | or revocation list in the | ||
189 | .Fa stack | ||
190 | or \-1 if | ||
191 | .Fa type | ||
192 | is neither | ||
193 | .Dv X509_LU_X509 | ||
194 | nor | ||
195 | .Dv X509_LU_CRL | ||
196 | or if no match is found. | ||
197 | .Pp | ||
198 | .Fn X509_OBJECT_retrieve_by_subject | ||
199 | returns the first matching certificate or revocation list in the | ||
200 | .Fa stack | ||
201 | or | ||
202 | .Dv NULL | ||
203 | if | ||
204 | .Fa type | ||
205 | is neither | ||
206 | .Dv X509_LU_X509 | ||
207 | nor | ||
208 | .Dv X509_LU_CRL | ||
209 | or if no match is found. | ||
210 | .Pp | ||
211 | .Fn X509_OBJECT_retrieve_match | ||
212 | returns the first matching | ||
213 | .Vt X509_OBJECT | ||
214 | or | ||
215 | .Dv NULL | ||
216 | if | ||
217 | .Fa stack | ||
218 | or | ||
219 | .Fa obj | ||
220 | is | ||
221 | .Dv NULL | ||
222 | or no match is found. | ||
223 | .Sh SEE ALSO | ||
224 | .Xr STACK_OF 3 , | ||
225 | .Xr X509_CRL_new 3 , | ||
226 | .Xr X509_LOOKUP_new 3 , | ||
227 | .Xr X509_NAME_new 3 , | ||
228 | .Xr X509_new 3 , | ||
229 | .Xr X509_STORE_get0_objects 3 , | ||
230 | .Xr X509_STORE_get_by_subject 3 , | ||
231 | .Xr X509_STORE_load_locations 3 , | ||
232 | .Xr X509_STORE_new 3 | ||
233 | .Sh HISTORY | ||
234 | .Fn X509_OBJECT_idx_by_subject , | ||
235 | .Fn X509_OBJECT_retrieve_by_subject , | ||
236 | and | ||
237 | .Fn X509_OBJECT_retrieve_match | ||
238 | first appeared in OpenSSL 0.9.6 and have been available since | ||
239 | .Ox 2.9 . | ||
240 | .Pp | ||
241 | .Fn X509_OBJECT_get_type , | ||
242 | .Fn X509_OBJECT_get0_X509 , | ||
243 | and | ||
244 | .Fn X509_OBJECT_get0_X509_CRL | ||
245 | first appeared in OpenSSL 1.1.0 and have been available since | ||
246 | .Ox 6.3 . | ||
247 | .Pp | ||
248 | .Fn X509_OBJECT_new | ||
249 | and | ||
250 | .Fn X509_OBJECT_free | ||
251 | first appeared in OpenSSL 1.1.0 and have been available since | ||
252 | .Ox 7.1 . | ||