diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/man/X509_ALGOR_dup.3 | 297 |
1 files changed, 0 insertions, 297 deletions
diff --git a/src/lib/libcrypto/man/X509_ALGOR_dup.3 b/src/lib/libcrypto/man/X509_ALGOR_dup.3 deleted file mode 100644 index ef7ca75863..0000000000 --- a/src/lib/libcrypto/man/X509_ALGOR_dup.3 +++ /dev/null | |||
@@ -1,297 +0,0 @@ | |||
1 | .\" $OpenBSD: X509_ALGOR_dup.3,v 1.23 2024/03/19 17:34:05 tb Exp $ | ||
2 | .\" OpenSSL 4692340e Jun 7 15:49:08 2016 -0400 | ||
3 | .\" | ||
4 | .\" This file is a derived work. | ||
5 | .\" The changes are covered by the following Copyright and license: | ||
6 | .\" | ||
7 | .\" Copyright (c) 2023 Theo Buehler <tb@openbsd.org> | ||
8 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
9 | .\" | ||
10 | .\" Permission to use, copy, modify, and distribute this software for any | ||
11 | .\" purpose with or without fee is hereby granted, provided that the above | ||
12 | .\" copyright notice and this permission notice appear in all copies. | ||
13 | .\" | ||
14 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
15 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
16 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
17 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
18 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
19 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
20 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
21 | .\" | ||
22 | .\" The original file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
23 | .\" Copyright (c) 2002, 2015 The OpenSSL Project. All rights reserved. | ||
24 | .\" | ||
25 | .\" Redistribution and use in source and binary forms, with or without | ||
26 | .\" modification, are permitted provided that the following conditions | ||
27 | .\" are met: | ||
28 | .\" | ||
29 | .\" 1. Redistributions of source code must retain the above copyright | ||
30 | .\" notice, this list of conditions and the following disclaimer. | ||
31 | .\" | ||
32 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
33 | .\" notice, this list of conditions and the following disclaimer in | ||
34 | .\" the documentation and/or other materials provided with the | ||
35 | .\" distribution. | ||
36 | .\" | ||
37 | .\" 3. All advertising materials mentioning features or use of this | ||
38 | .\" software must display the following acknowledgment: | ||
39 | .\" "This product includes software developed by the OpenSSL Project | ||
40 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
41 | .\" | ||
42 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
43 | .\" endorse or promote products derived from this software without | ||
44 | .\" prior written permission. For written permission, please contact | ||
45 | .\" openssl-core@openssl.org. | ||
46 | .\" | ||
47 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
48 | .\" nor may "OpenSSL" appear in their names without prior written | ||
49 | .\" permission of the OpenSSL Project. | ||
50 | .\" | ||
51 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
52 | .\" acknowledgment: | ||
53 | .\" "This product includes software developed by the OpenSSL Project | ||
54 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
55 | .\" | ||
56 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
57 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
58 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
59 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
60 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
61 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
62 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
63 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
64 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
65 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
68 | .\" | ||
69 | .Dd $Mdocdate: March 19 2024 $ | ||
70 | .Dt X509_ALGOR_DUP 3 | ||
71 | .Os | ||
72 | .Sh NAME | ||
73 | .Nm X509_ALGOR_new , | ||
74 | .Nm X509_ALGOR_free , | ||
75 | .Nm X509_ALGOR_dup , | ||
76 | .Nm X509_ALGOR_set0 , | ||
77 | .Nm X509_ALGOR_get0 , | ||
78 | .Nm X509_ALGOR_cmp | ||
79 | .Nd create, change, and inspect algorithm identifiers | ||
80 | .Sh SYNOPSIS | ||
81 | .In openssl/x509.h | ||
82 | .Ft X509_ALGOR * | ||
83 | .Fn X509_ALGOR_new void | ||
84 | .Ft void | ||
85 | .Fn X509_ALGOR_free "X509_ALGOR *alg" | ||
86 | .Ft X509_ALGOR * | ||
87 | .Fo X509_ALGOR_dup | ||
88 | .Fa "X509_ALGOR *alg" | ||
89 | .Fc | ||
90 | .Ft int | ||
91 | .Fo X509_ALGOR_set0 | ||
92 | .Fa "X509_ALGOR *alg" | ||
93 | .Fa "ASN1_OBJECT *aobj" | ||
94 | .Fa "int ptype" | ||
95 | .Fa "void *pval" | ||
96 | .Fc | ||
97 | .Ft void | ||
98 | .Fo X509_ALGOR_get0 | ||
99 | .Fa "const ASN1_OBJECT **paobj" | ||
100 | .Fa "int *pptype" | ||
101 | .Fa "const void **ppval" | ||
102 | .Fa "const X509_ALGOR *alg" | ||
103 | .Fc | ||
104 | .Ft int | ||
105 | .Fo X509_ALGOR_cmp | ||
106 | .Fa "const X509_ALGOR *a" | ||
107 | .Fa "const X509_ALGOR *b" | ||
108 | .Fc | ||
109 | .Sh DESCRIPTION | ||
110 | An | ||
111 | .Vt X509_ALGOR | ||
112 | object represents an ASN.1 | ||
113 | .Vt AlgorithmIdentifier | ||
114 | structure defined in RFC 5280 section 4.1.1.2. | ||
115 | It specifies a cryptographic | ||
116 | .Fa algorithm | ||
117 | by an ASN.1 object identifier (OID) that can be obtained from | ||
118 | .Xr OBJ_nid2obj 3 , | ||
119 | together with optional algorithm-specific | ||
120 | .Fa parameters | ||
121 | of the type | ||
122 | .Vt ASN1_TYPE , | ||
123 | see | ||
124 | .Xr ASN1_TYPE_set 3 . | ||
125 | .Vt X509_ALGOR | ||
126 | objects are used by many other objects, for example certificates, | ||
127 | certificate revocation lists, and certificate requests. | ||
128 | .Pp | ||
129 | .Fn X509_ALGOR_new | ||
130 | allocates a new | ||
131 | .Vt X509_ALGOR | ||
132 | object containing the object that | ||
133 | .Xr OBJ_nid2obj 3 | ||
134 | returns for | ||
135 | .Dv NID_undef | ||
136 | as the | ||
137 | .Fa algorithm | ||
138 | and a | ||
139 | .Dv NULL | ||
140 | pointer as the | ||
141 | .Fa parameters . | ||
142 | .Pp | ||
143 | .Fn X509_ALGOR_free | ||
144 | frees | ||
145 | .Fa alg | ||
146 | and any data contained in it. | ||
147 | If | ||
148 | .Fa alg | ||
149 | is | ||
150 | .Dv NULL , | ||
151 | no action occurs. | ||
152 | .Pp | ||
153 | .Fn X509_ALGOR_dup | ||
154 | creates a deep copy of | ||
155 | .Fa alg . | ||
156 | It is implemented by calling | ||
157 | .Xr ASN1_item_dup 3 | ||
158 | with arguments of | ||
159 | .Dv X509_ALGOR_it | ||
160 | and | ||
161 | .Fa alg , | ||
162 | which is equivalent to calling | ||
163 | .Xr i2d_X509_ALGOR 3 | ||
164 | and | ||
165 | .Xr d2i_X509_ALGOR 3 . | ||
166 | .Pp | ||
167 | .Fn X509_ALGOR_set0 | ||
168 | sets the algorithm OID of | ||
169 | .Fa alg | ||
170 | to | ||
171 | .Fa aobj | ||
172 | and the associated parameter type to | ||
173 | .Fa ptype | ||
174 | with value | ||
175 | .Fa pval . | ||
176 | If | ||
177 | .Fa ptype | ||
178 | is | ||
179 | .Dv V_ASN1_UNDEF , | ||
180 | the parameter is omitted and | ||
181 | .Fa pval | ||
182 | is ignored. | ||
183 | If | ||
184 | .Fa ptype | ||
185 | is zero, | ||
186 | .Fa pval | ||
187 | is ignored and the existing parameter is left unchanged, or if | ||
188 | .Fa alg | ||
189 | does not contain a parameter, a new, empty parameter of type | ||
190 | .Dv V_ASN1_UNDEF | ||
191 | is added. | ||
192 | Otherwise | ||
193 | .Fa ptype | ||
194 | and | ||
195 | .Fa pval | ||
196 | have the same meaning as the | ||
197 | .Fa type | ||
198 | and | ||
199 | .Fa value | ||
200 | parameters to | ||
201 | .Xr ASN1_TYPE_set 3 . | ||
202 | Ownership of | ||
203 | .Fa aobj | ||
204 | and, unless it is ignored, of | ||
205 | .Fa pval | ||
206 | is transferred to | ||
207 | .Fa alg | ||
208 | on success. | ||
209 | .Pp | ||
210 | .Fn X509_ALGOR_get0 | ||
211 | returns | ||
212 | .Fa alg Ns 's | ||
213 | algorithm OID in | ||
214 | .Pf * Fa paobj , | ||
215 | its parameter type in | ||
216 | .Pf * Fa pptype , | ||
217 | and its parameter value in | ||
218 | .Pf * Fa ppval . | ||
219 | Any of | ||
220 | .Fa paobj , | ||
221 | .Fa pptype , | ||
222 | and | ||
223 | .Fa ppval | ||
224 | can be | ||
225 | .Dv NULL . | ||
226 | If | ||
227 | .Fa pptype is | ||
228 | .Dv NULL | ||
229 | or if | ||
230 | .Pf * Fa pptype | ||
231 | is | ||
232 | .Dv V_ASN1_UNDEF | ||
233 | then | ||
234 | .Pf * Fa ppval Ns 's | ||
235 | value is undefined. | ||
236 | .Pp | ||
237 | .Fn X509_ALGOR_cmp | ||
238 | compares | ||
239 | .Fa a | ||
240 | and | ||
241 | .Fa b . | ||
242 | .Sh RETURN VALUES | ||
243 | .Fn X509_ALGOR_new | ||
244 | and | ||
245 | .Fn X509_ALGOR_dup | ||
246 | return a new | ||
247 | .Vt X509_ALGOR | ||
248 | object or | ||
249 | .Dv NULL | ||
250 | if an error occurs. | ||
251 | .Pp | ||
252 | .Fn X509_ALGOR_set0 | ||
253 | returns 1 for success or 0 if | ||
254 | .Fa alg | ||
255 | is | ||
256 | .Dv NULL | ||
257 | or memory allocation fails. | ||
258 | .Pp | ||
259 | .Fn X509_ALGOR_cmp | ||
260 | returns 0 if | ||
261 | .Fa a | ||
262 | and | ||
263 | .Fa b | ||
264 | have identical encodings or non-zero otherwise. | ||
265 | .Sh SEE ALSO | ||
266 | .Xr ASN1_TYPE_set 3 , | ||
267 | .Xr d2i_X509_ALGOR 3 , | ||
268 | .Xr EVP_DigestInit 3 , | ||
269 | .Xr OBJ_nid2obj 3 , | ||
270 | .Xr X509_get0_signature 3 , | ||
271 | .Xr X509_new 3 , | ||
272 | .Xr X509_PUBKEY_get0_param 3 , | ||
273 | .Xr X509_signature_dump 3 | ||
274 | .Sh STANDARDS | ||
275 | RFC 5280: Internet X.509 Public Key Infrastructure Certificate and | ||
276 | Certificate Revocation List (CRL) Profile | ||
277 | .Sh HISTORY | ||
278 | .Fn X509_ALGOR_new | ||
279 | and | ||
280 | .Fn X509_ALGOR_free | ||
281 | appeared in SSLeay 0.4 or earlier and have been available since | ||
282 | .Ox 2.4 . | ||
283 | .Pp | ||
284 | .Fn X509_ALGOR_dup | ||
285 | first appeared in SSLeay 0.9.1 and has been available since | ||
286 | .Ox 2.6 . | ||
287 | .Pp | ||
288 | .Fn X509_ALGOR_set0 | ||
289 | and | ||
290 | .Fn X509_ALGOR_get0 | ||
291 | first appeared in OpenSSL 0.9.8h and have been available since | ||
292 | .Ox 4.5 . | ||
293 | .Pp | ||
294 | .Fn X509_ALGOR_cmp | ||
295 | first appeared in OpenSSL 0.9.8zd, 1.0.0p, and 1.0.1k | ||
296 | and has been available since | ||
297 | .Ox 4.9 . | ||