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