5 DECLARE_ASN1_FUNCTIONS,
6 IMPLEMENT_ASN1_FUNCTIONS,
8 ACCESS_DESCRIPTION_free,
9 ACCESS_DESCRIPTION_new,
12 ADMISSION_SYNTAX_free,
16 ASIdentifierChoice_free,
17 ASIdentifierChoice_new,
22 AUTHORITY_INFO_ACCESS_free,
23 AUTHORITY_INFO_ACCESS_new,
26 BASIC_CONSTRAINTS_free,
27 BASIC_CONSTRAINTS_new,
28 CERTIFICATEPOLICIES_free,
29 CERTIFICATEPOLICIES_new,
32 CMS_ContentInfo_new_ex,
33 CMS_ContentInfo_print_ctx,
35 CMS_ReceiptRequest_free,
36 CMS_ReceiptRequest_new,
60 ESS_ISSUER_SERIAL_dup,
61 ESS_ISSUER_SERIAL_free,
62 ESS_ISSUER_SERIAL_new,
64 ESS_SIGNING_CERT_free,
67 ESS_SIGNING_CERT_V2_dup,
68 ESS_SIGNING_CERT_V2_free,
69 ESS_SIGNING_CERT_V2_it,
70 ESS_SIGNING_CERT_V2_new,
71 EXTENDED_KEY_USAGE_free,
72 EXTENDED_KEY_USAGE_new,
84 IPAddressOrRange_free,
88 ISSUER_SIGN_TOOL_free,
91 ISSUING_DIST_POINT_free,
92 ISSUING_DIST_POINT_it,
93 ISSUING_DIST_POINT_new,
94 NAME_CONSTRAINTS_free,
96 NAMING_AUTHORITY_free,
98 NETSCAPE_CERT_SEQUENCE_free,
99 NETSCAPE_CERT_SEQUENCE_new,
110 OCSP_CERTSTATUS_free,
125 OCSP_REVOKEDINFO_free,
126 OCSP_REVOKEDINFO_new,
127 OCSP_SERVICELOC_free,
131 OCSP_SINGLERESP_free,
138 OSSL_CMP_PKIHEADER_free,
139 OSSL_CMP_PKIHEADER_it,
140 OSSL_CMP_PKIHEADER_new,
145 OSSL_CMP_PKISTATUS_it,
146 OSSL_CRMF_CERTID_dup,
147 OSSL_CRMF_CERTID_free,
149 OSSL_CRMF_CERTID_new,
150 OSSL_CRMF_CERTTEMPLATE_free,
151 OSSL_CRMF_CERTTEMPLATE_it,
152 OSSL_CRMF_CERTTEMPLATE_new,
153 OSSL_CRMF_ENCRYPTEDVALUE_free,
154 OSSL_CRMF_ENCRYPTEDVALUE_it,
155 OSSL_CRMF_ENCRYPTEDVALUE_new,
163 OSSL_CRMF_PBMPARAMETER_free,
164 OSSL_CRMF_PBMPARAMETER_it,
165 OSSL_CRMF_PBMPARAMETER_new,
166 OSSL_CRMF_PKIPUBLICATIONINFO_free,
167 OSSL_CRMF_PKIPUBLICATIONINFO_it,
168 OSSL_CRMF_PKIPUBLICATIONINFO_new,
169 OSSL_CRMF_SINGLEPUBINFO_free,
170 OSSL_CRMF_SINGLEPUBINFO_it,
171 OSSL_CRMF_SINGLEPUBINFO_new,
182 PKCS12_MAC_DATA_free,
192 PKCS7_ENC_CONTENT_free,
193 PKCS7_ENC_CONTENT_new,
196 PKCS7_ISSUER_AND_SERIAL_free,
197 PKCS7_ISSUER_AND_SERIAL_new,
198 PKCS7_RECIP_INFO_free,
199 PKCS7_RECIP_INFO_new,
202 PKCS7_SIGNER_INFO_free,
203 PKCS7_SIGNER_INFO_new,
204 PKCS7_SIGN_ENVELOPE_free,
205 PKCS7_SIGN_ENVELOPE_new,
211 PKCS8_PRIV_KEY_INFO_free,
212 PKCS8_PRIV_KEY_INFO_new,
213 PKEY_USAGE_PERIOD_free,
214 PKEY_USAGE_PERIOD_new,
219 POLICY_CONSTRAINTS_free,
220 POLICY_CONSTRAINTS_new,
223 PROFESSION_INFOS_free,
224 PROFESSION_INFOS_new,
225 PROFESSION_INFO_free,
227 PROXY_CERT_INFO_EXTENSION_free,
228 PROXY_CERT_INFO_EXTENSION_new,
233 RSA_OAEP_PARAMS_free,
286 X509_NAME_ENTRY_free,
305 - ASN1 object utilities
311 #include <openssl/asn1t.h>
313 DECLARE_ASN1_FUNCTIONS(type)
314 IMPLEMENT_ASN1_FUNCTIONS(stname)
316 typedef struct ASN1_ITEM_st ASN1_ITEM;
318 extern const ASN1_ITEM TYPE_it;
319 TYPE *TYPE_new(void);
320 TYPE *TYPE_dup(const TYPE *a);
321 void TYPE_free(TYPE *a);
322 int TYPE_print_ctx(BIO *out, TYPE *a, int indent, const ASN1_PCTX *pctx);
324 The following functions have been deprecated since OpenSSL 3.0, and can be
325 hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
326 see L<openssl_user_macros(7)>:
328 DSA *DSAparams_dup(const DSA *dsa);
329 RSA *RSAPrivateKey_dup(const RSA *rsa);
330 RSA *RSAPublicKey_dup(const RSA *rsa);
334 In the description below, B<I<TYPE>> is used
335 as a placeholder for any of the OpenSSL datatypes, such as B<X509>.
337 The OpenSSL ASN1 parsing library templates are like a data-driven bytecode
339 Every ASN1 object as a global variable, TYPE_it, that describes the item
340 such as its fields. (On systems which cannot export variables from shared
341 libraries, the global is instead a function which returns a pointer to a
344 The macro DECLARE_ASN1_FUNCTIONS() is typically used in header files
345 to generate the function declarations.
347 The macro IMPLEMENT_ASN1_FUNCTIONS() is used once in a source file
348 to generate the function bodies.
351 B<I<TYPE>_new>() allocates an empty object of the indicated type.
352 The object returned must be released by calling B<I<TYPE>_free>().
354 B<I<TYPE>_new_ex>() is similar to B<I<TYPE>_new>() but also passes the
355 library context I<libctx> and the property query I<propq> to use when retrieving
356 algorithms from providers. This created object can then be used when loading
357 binary data using B<d2i_I<TYPE>>().
359 B<I<TYPE>_dup>() copies an existing object, leaving it untouched.
361 B<I<TYPE>_free>() releases the object and all pointers and sub-objects
364 B<I<TYPE>_print_ctx>() prints the object I<a> on the specified BIO I<out>.
365 Each line will be prefixed with I<indent> spaces.
366 The I<pctx> specifies the printing context and is for internal
367 use; use NULL to get the default behavior. If a print function is
368 user-defined, then pass in any I<pctx> down to any nested calls.
372 B<I<TYPE>_new>(), B<I<TYPE>_new_ex>() and B<I<TYPE>_dup>() return a pointer to
373 the object or NULL on failure.
375 B<I<TYPE>_print_ctx>() returns 1 on success or zero on failure.
379 The functions X509_REQ_new_ex(), X509_CRL_new_ex(), PKCS7_new_ex() and
380 CMS_ContentInfo_new_ex() were added in OpenSSL 3.0.
382 The functions DSAparams_dup(), RSAPrivateKey_dup() and RSAPublicKey_dup() were
387 Copyright 2016-2022 The OpenSSL Project Authors. All Rights Reserved.
389 Licensed under the Apache License 2.0 (the "License"). You may not use
390 this file except in compliance with the License. You can obtain a copy
391 in the file LICENSE in the source distribution or at
392 L<https://www.openssl.org/source/license.html>.