]>
Commit | Line | Data |
---|---|---|
12ce9ea2 RS |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | DECLARE_ASN1_FUNCTIONS, | |
6 | IMPLEMENT_ASN1_FUNCTIONS, | |
7 | ASN1_ITEM, | |
8 | ACCESS_DESCRIPTION_free, | |
9 | ACCESS_DESCRIPTION_new, | |
fa743582 RS |
10 | ADMISSIONS_free, |
11 | ADMISSIONS_new, | |
12 | ADMISSION_SYNTAX_free, | |
13 | ADMISSION_SYNTAX_new, | |
12ce9ea2 RS |
14 | ASIdOrRange_free, |
15 | ASIdOrRange_new, | |
16 | ASIdentifierChoice_free, | |
17 | ASIdentifierChoice_new, | |
18 | ASIdentifiers_free, | |
19 | ASIdentifiers_new, | |
20 | ASRange_free, | |
21 | ASRange_new, | |
22 | AUTHORITY_INFO_ACCESS_free, | |
23 | AUTHORITY_INFO_ACCESS_new, | |
24 | AUTHORITY_KEYID_free, | |
25 | AUTHORITY_KEYID_new, | |
26 | BASIC_CONSTRAINTS_free, | |
27 | BASIC_CONSTRAINTS_new, | |
28 | CERTIFICATEPOLICIES_free, | |
29 | CERTIFICATEPOLICIES_new, | |
30 | CMS_ContentInfo_free, | |
31 | CMS_ContentInfo_new, | |
d8652be0 | 32 | CMS_ContentInfo_new_ex, |
12ce9ea2 RS |
33 | CMS_ContentInfo_print_ctx, |
34 | CMS_ReceiptRequest_free, | |
35 | CMS_ReceiptRequest_new, | |
36 | CRL_DIST_POINTS_free, | |
37 | CRL_DIST_POINTS_new, | |
38 | DIRECTORYSTRING_free, | |
39 | DIRECTORYSTRING_new, | |
40 | DISPLAYTEXT_free, | |
41 | DISPLAYTEXT_new, | |
42 | DIST_POINT_NAME_free, | |
43 | DIST_POINT_NAME_new, | |
44 | DIST_POINT_free, | |
45 | DIST_POINT_new, | |
46 | DSAparams_dup, | |
9ba6f347 KY |
47 | ECPARAMETERS_free, |
48 | ECPARAMETERS_new, | |
49 | ECPKPARAMETERS_free, | |
50 | ECPKPARAMETERS_new, | |
12ce9ea2 RS |
51 | EDIPARTYNAME_free, |
52 | EDIPARTYNAME_new, | |
53 | ESS_CERT_ID_dup, | |
54 | ESS_CERT_ID_free, | |
55 | ESS_CERT_ID_new, | |
8c00f267 F |
56 | ESS_CERT_ID_V2_dup, |
57 | ESS_CERT_ID_V2_free, | |
58 | ESS_CERT_ID_V2_new, | |
12ce9ea2 RS |
59 | ESS_ISSUER_SERIAL_dup, |
60 | ESS_ISSUER_SERIAL_free, | |
61 | ESS_ISSUER_SERIAL_new, | |
62 | ESS_SIGNING_CERT_dup, | |
63 | ESS_SIGNING_CERT_free, | |
64 | ESS_SIGNING_CERT_new, | |
8c00f267 F |
65 | ESS_SIGNING_CERT_V2_dup, |
66 | ESS_SIGNING_CERT_V2_free, | |
67 | ESS_SIGNING_CERT_V2_new, | |
12ce9ea2 RS |
68 | EXTENDED_KEY_USAGE_free, |
69 | EXTENDED_KEY_USAGE_new, | |
70 | GENERAL_NAMES_free, | |
71 | GENERAL_NAMES_new, | |
72 | GENERAL_NAME_dup, | |
73 | GENERAL_NAME_free, | |
74 | GENERAL_NAME_new, | |
75 | GENERAL_SUBTREE_free, | |
76 | GENERAL_SUBTREE_new, | |
77 | IPAddressChoice_free, | |
78 | IPAddressChoice_new, | |
79 | IPAddressFamily_free, | |
80 | IPAddressFamily_new, | |
81 | IPAddressOrRange_free, | |
82 | IPAddressOrRange_new, | |
83 | IPAddressRange_free, | |
84 | IPAddressRange_new, | |
d9321c09 NM |
85 | ISSUER_SIGN_TOOL_free, |
86 | ISSUER_SIGN_TOOL_it, | |
87 | ISSUER_SIGN_TOOL_new, | |
12ce9ea2 | 88 | ISSUING_DIST_POINT_free, |
d9321c09 | 89 | ISSUING_DIST_POINT_it, |
12ce9ea2 RS |
90 | ISSUING_DIST_POINT_new, |
91 | NAME_CONSTRAINTS_free, | |
92 | NAME_CONSTRAINTS_new, | |
fa743582 RS |
93 | NAMING_AUTHORITY_free, |
94 | NAMING_AUTHORITY_new, | |
12ce9ea2 RS |
95 | NETSCAPE_CERT_SEQUENCE_free, |
96 | NETSCAPE_CERT_SEQUENCE_new, | |
97 | NETSCAPE_SPKAC_free, | |
98 | NETSCAPE_SPKAC_new, | |
99 | NETSCAPE_SPKI_free, | |
100 | NETSCAPE_SPKI_new, | |
101 | NOTICEREF_free, | |
102 | NOTICEREF_new, | |
103 | OCSP_BASICRESP_free, | |
104 | OCSP_BASICRESP_new, | |
105 | OCSP_CERTID_dup, | |
106 | OCSP_CERTID_new, | |
107 | OCSP_CERTSTATUS_free, | |
108 | OCSP_CERTSTATUS_new, | |
109 | OCSP_CRLID_free, | |
110 | OCSP_CRLID_new, | |
111 | OCSP_ONEREQ_free, | |
112 | OCSP_ONEREQ_new, | |
113 | OCSP_REQINFO_free, | |
114 | OCSP_REQINFO_new, | |
115 | OCSP_RESPBYTES_free, | |
116 | OCSP_RESPBYTES_new, | |
117 | OCSP_RESPDATA_free, | |
118 | OCSP_RESPDATA_new, | |
119 | OCSP_RESPID_free, | |
120 | OCSP_RESPID_new, | |
121 | OCSP_RESPONSE_new, | |
122 | OCSP_REVOKEDINFO_free, | |
123 | OCSP_REVOKEDINFO_new, | |
124 | OCSP_SERVICELOC_free, | |
125 | OCSP_SERVICELOC_new, | |
126 | OCSP_SIGNATURE_free, | |
127 | OCSP_SIGNATURE_new, | |
128 | OCSP_SINGLERESP_free, | |
129 | OCSP_SINGLERESP_new, | |
62dcd2aa | 130 | OSSL_CMP_ITAV_dup, |
8869ad4a | 131 | OSSL_CMP_ITAV_free, |
62dcd2aa | 132 | OSSL_CMP_MSG_dup, |
227d4265 | 133 | OSSL_CMP_MSG_it, |
7960dbec | 134 | OSSL_CMP_MSG_free, |
8869ad4a AK |
135 | OSSL_CMP_PKIHEADER_free, |
136 | OSSL_CMP_PKIHEADER_it, | |
137 | OSSL_CMP_PKIHEADER_new, | |
62dcd2aa | 138 | OSSL_CMP_PKISI_dup, |
8869ad4a | 139 | OSSL_CMP_PKISI_free, |
62dcd2aa | 140 | OSSL_CMP_PKISI_it, |
7960dbec | 141 | OSSL_CMP_PKISI_new, |
8869ad4a | 142 | OSSL_CMP_PKISTATUS_it, |
e197158b | 143 | OSSL_CRMF_CERTID_dup, |
2a3b52ea | 144 | OSSL_CRMF_CERTID_free, |
8869ad4a | 145 | OSSL_CRMF_CERTID_it, |
2a3b52ea DO |
146 | OSSL_CRMF_CERTID_new, |
147 | OSSL_CRMF_CERTTEMPLATE_free, | |
8869ad4a | 148 | OSSL_CRMF_CERTTEMPLATE_it, |
2a3b52ea DO |
149 | OSSL_CRMF_CERTTEMPLATE_new, |
150 | OSSL_CRMF_ENCRYPTEDVALUE_free, | |
8869ad4a | 151 | OSSL_CRMF_ENCRYPTEDVALUE_it, |
2a3b52ea | 152 | OSSL_CRMF_ENCRYPTEDVALUE_new, |
8869ad4a AK |
153 | OSSL_CRMF_MSGS_free, |
154 | OSSL_CRMF_MSGS_it, | |
155 | OSSL_CRMF_MSGS_new, | |
299e0f1e | 156 | OSSL_CRMF_MSG_dup, |
2a3b52ea | 157 | OSSL_CRMF_MSG_free, |
8869ad4a | 158 | OSSL_CRMF_MSG_it, |
2a3b52ea DO |
159 | OSSL_CRMF_MSG_new, |
160 | OSSL_CRMF_PBMPARAMETER_free, | |
8869ad4a | 161 | OSSL_CRMF_PBMPARAMETER_it, |
2a3b52ea DO |
162 | OSSL_CRMF_PBMPARAMETER_new, |
163 | OSSL_CRMF_PKIPUBLICATIONINFO_free, | |
8869ad4a | 164 | OSSL_CRMF_PKIPUBLICATIONINFO_it, |
2a3b52ea | 165 | OSSL_CRMF_PKIPUBLICATIONINFO_new, |
8869ad4a AK |
166 | OSSL_CRMF_SINGLEPUBINFO_free, |
167 | OSSL_CRMF_SINGLEPUBINFO_it, | |
168 | OSSL_CRMF_SINGLEPUBINFO_new, | |
12ce9ea2 RS |
169 | OTHERNAME_free, |
170 | OTHERNAME_new, | |
171 | PBE2PARAM_free, | |
172 | PBE2PARAM_new, | |
173 | PBEPARAM_free, | |
174 | PBEPARAM_new, | |
175 | PBKDF2PARAM_free, | |
176 | PBKDF2PARAM_new, | |
177 | PKCS12_BAGS_free, | |
178 | PKCS12_BAGS_new, | |
179 | PKCS12_MAC_DATA_free, | |
180 | PKCS12_MAC_DATA_new, | |
181 | PKCS12_SAFEBAG_free, | |
182 | PKCS12_SAFEBAG_new, | |
183 | PKCS12_free, | |
184 | PKCS12_new, | |
185 | PKCS7_DIGEST_free, | |
186 | PKCS7_DIGEST_new, | |
187 | PKCS7_ENCRYPT_free, | |
188 | PKCS7_ENCRYPT_new, | |
189 | PKCS7_ENC_CONTENT_free, | |
190 | PKCS7_ENC_CONTENT_new, | |
191 | PKCS7_ENVELOPE_free, | |
192 | PKCS7_ENVELOPE_new, | |
193 | PKCS7_ISSUER_AND_SERIAL_free, | |
194 | PKCS7_ISSUER_AND_SERIAL_new, | |
195 | PKCS7_RECIP_INFO_free, | |
196 | PKCS7_RECIP_INFO_new, | |
197 | PKCS7_SIGNED_free, | |
198 | PKCS7_SIGNED_new, | |
199 | PKCS7_SIGNER_INFO_free, | |
200 | PKCS7_SIGNER_INFO_new, | |
201 | PKCS7_SIGN_ENVELOPE_free, | |
202 | PKCS7_SIGN_ENVELOPE_new, | |
203 | PKCS7_dup, | |
204 | PKCS7_free, | |
d8652be0 | 205 | PKCS7_new_ex, |
12ce9ea2 RS |
206 | PKCS7_new, |
207 | PKCS7_print_ctx, | |
208 | PKCS8_PRIV_KEY_INFO_free, | |
209 | PKCS8_PRIV_KEY_INFO_new, | |
210 | PKEY_USAGE_PERIOD_free, | |
211 | PKEY_USAGE_PERIOD_new, | |
212 | POLICYINFO_free, | |
213 | POLICYINFO_new, | |
214 | POLICYQUALINFO_free, | |
215 | POLICYQUALINFO_new, | |
216 | POLICY_CONSTRAINTS_free, | |
217 | POLICY_CONSTRAINTS_new, | |
218 | POLICY_MAPPING_free, | |
219 | POLICY_MAPPING_new, | |
fa743582 RS |
220 | PROFESSION_INFOS_free, |
221 | PROFESSION_INFOS_new, | |
227d4265 DMSP |
222 | PROFESSION_INFO_free, |
223 | PROFESSION_INFO_new, | |
12ce9ea2 RS |
224 | PROXY_CERT_INFO_EXTENSION_free, |
225 | PROXY_CERT_INFO_EXTENSION_new, | |
226 | PROXY_POLICY_free, | |
227 | PROXY_POLICY_new, | |
228 | RSAPrivateKey_dup, | |
229 | RSAPublicKey_dup, | |
230 | RSA_OAEP_PARAMS_free, | |
231 | RSA_OAEP_PARAMS_new, | |
232 | RSA_PSS_PARAMS_free, | |
233 | RSA_PSS_PARAMS_new, | |
2145ba5e | 234 | RSA_PSS_PARAMS_dup, |
00606b06 HK |
235 | SCRYPT_PARAMS_free, |
236 | SCRYPT_PARAMS_new, | |
12ce9ea2 RS |
237 | SXNETID_free, |
238 | SXNETID_new, | |
239 | SXNET_free, | |
240 | SXNET_new, | |
241 | TLS_FEATURE_free, | |
242 | TLS_FEATURE_new, | |
243 | TS_ACCURACY_dup, | |
244 | TS_ACCURACY_free, | |
245 | TS_ACCURACY_new, | |
246 | TS_MSG_IMPRINT_dup, | |
247 | TS_MSG_IMPRINT_free, | |
248 | TS_MSG_IMPRINT_new, | |
249 | TS_REQ_dup, | |
250 | TS_REQ_free, | |
251 | TS_REQ_new, | |
252 | TS_RESP_dup, | |
253 | TS_RESP_free, | |
254 | TS_RESP_new, | |
255 | TS_STATUS_INFO_dup, | |
256 | TS_STATUS_INFO_free, | |
257 | TS_STATUS_INFO_new, | |
258 | TS_TST_INFO_dup, | |
259 | TS_TST_INFO_free, | |
260 | TS_TST_INFO_new, | |
261 | USERNOTICE_free, | |
262 | USERNOTICE_new, | |
263 | X509_ALGOR_free, | |
d9321c09 | 264 | X509_ALGOR_it, |
12ce9ea2 RS |
265 | X509_ALGOR_new, |
266 | X509_ATTRIBUTE_dup, | |
267 | X509_ATTRIBUTE_free, | |
268 | X509_ATTRIBUTE_new, | |
269 | X509_CERT_AUX_free, | |
270 | X509_CERT_AUX_new, | |
271 | X509_CINF_free, | |
272 | X509_CINF_new, | |
273 | X509_CRL_INFO_free, | |
274 | X509_CRL_INFO_new, | |
12ce9ea2 RS |
275 | X509_CRL_dup, |
276 | X509_CRL_free, | |
277 | X509_CRL_new, | |
278 | X509_EXTENSION_dup, | |
279 | X509_EXTENSION_free, | |
280 | X509_EXTENSION_new, | |
281 | X509_NAME_ENTRY_dup, | |
282 | X509_NAME_ENTRY_free, | |
283 | X509_NAME_ENTRY_new, | |
284 | X509_NAME_dup, | |
285 | X509_NAME_free, | |
286 | X509_NAME_new, | |
287 | X509_REQ_INFO_free, | |
288 | X509_REQ_INFO_new, | |
289 | X509_REQ_dup, | |
290 | X509_REQ_free, | |
291 | X509_REQ_new, | |
e72dbd8e | 292 | X509_REQ_new_ex, |
12ce9ea2 RS |
293 | X509_REVOKED_dup, |
294 | X509_REVOKED_free, | |
295 | X509_REVOKED_new, | |
296 | X509_SIG_free, | |
297 | X509_SIG_new, | |
298 | X509_VAL_free, | |
299 | X509_VAL_new, | |
300 | X509_dup, | |
301 | - ASN1 object utilities | |
302 | ||
303 | =head1 SYNOPSIS | |
304 | ||
bb82531f | 305 | =for openssl generic |
b97fdb57 | 306 | |
12ce9ea2 RS |
307 | #include <openssl/asn1t.h> |
308 | ||
91da5e77 RS |
309 | DECLARE_ASN1_FUNCTIONS(type) |
310 | IMPLEMENT_ASN1_FUNCTIONS(stname) | |
12ce9ea2 RS |
311 | |
312 | typedef struct ASN1_ITEM_st ASN1_ITEM; | |
313 | ||
314 | extern const ASN1_ITEM TYPE_it; | |
315 | TYPE *TYPE_new(void); | |
9fdcc21f | 316 | TYPE *TYPE_dup(const TYPE *a); |
12ce9ea2 RS |
317 | void TYPE_free(TYPE *a); |
318 | int TYPE_print_ctx(BIO *out, TYPE *a, int indent, const ASN1_PCTX *pctx); | |
319 | ||
12ce9ea2 RS |
320 | =head1 DESCRIPTION |
321 | ||
bbecf04e RL |
322 | In the description below, B<I<TYPE>> is used |
323 | as a placeholder for any of the OpenSSL datatypes, such as B<X509>. | |
12ce9ea2 RS |
324 | |
325 | The OpenSSL ASN1 parsing library templates are like a data-driven bytecode | |
326 | interpreter. | |
327 | Every ASN1 object as a global variable, TYPE_it, that describes the item | |
328 | such as its fields. (On systems which cannot export variables from shared | |
329 | libraries, the global is instead a function which returns a pointer to a | |
330 | static variable. | |
331 | ||
332 | The macro DECLARE_ASN1_FUNCTIONS() is typically used in header files | |
333 | to generate the function declarations. | |
334 | ||
335 | The macro IMPLEMENT_ASN1_FUNCTIONS() is used once in a source file | |
336 | to generate the function bodies. | |
337 | ||
338 | ||
bbecf04e RL |
339 | B<I<TYPE>_new>() allocates an empty object of the indicated type. |
340 | The object returned must be released by calling B<I<TYPE>_free>(). | |
12ce9ea2 | 341 | |
d8652be0 | 342 | B<I<TYPE>_new_ex>() is similiar to B<I<TYPE>_new>() but also passes the |
90a1f2d7 SL |
343 | library context I<libctx> and the property query I<propq> to use when retrieving |
344 | algorithms from providers. | |
345 | ||
bbecf04e | 346 | B<I<TYPE>_dup>() copies an existing object, leaving it untouched. |
12ce9ea2 | 347 | |
bbecf04e | 348 | B<I<TYPE>_free>() releases the object and all pointers and sub-objects |
12ce9ea2 RS |
349 | within it. |
350 | ||
bbecf04e RL |
351 | B<I<TYPE>_print_ctx>() prints the object I<a> on the specified BIO I<out>. |
352 | Each line will be prefixed with I<indent> spaces. | |
353 | The I<pctx> specifies the printing context and is for internal | |
12ce9ea2 | 354 | use; use NULL to get the default behavior. If a print function is |
bbecf04e | 355 | user-defined, then pass in any I<pctx> down to any nested calls. |
12ce9ea2 RS |
356 | |
357 | =head1 RETURN VALUES | |
358 | ||
90a1f2d7 SL |
359 | B<I<TYPE>_new>(), B<I<TYPE>_new_ex>() and B<I<TYPE>_dup>() return a pointer to |
360 | the object or NULL on failure. | |
12ce9ea2 | 361 | |
bbecf04e | 362 | B<I<TYPE>_print_ctx>() returns 1 on success or zero on failure. |
12ce9ea2 | 363 | |
90a1f2d7 SL |
364 | =head1 HISTORY |
365 | ||
746f3674 | 366 | The functions PKCS7_new_ex() and CMS_ContentInfo_new_ex() were |
90a1f2d7 SL |
367 | added in OpenSSL 3.0. |
368 | ||
12ce9ea2 RS |
369 | =head1 COPYRIGHT |
370 | ||
33388b44 | 371 | Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. |
12ce9ea2 | 372 | |
4746f25a | 373 | Licensed under the Apache License 2.0 (the "License"). You may not use |
12ce9ea2 RS |
374 | this file except in compliance with the License. You can obtain a copy |
375 | in the file LICENSE in the source distribution or at | |
376 | L<https://www.openssl.org/source/license.html>. | |
377 | ||
378 | =cut |