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,
62 ESS_ISSUER_SERIAL_dup,
63 ESS_ISSUER_SERIAL_free,
64 ESS_ISSUER_SERIAL_new,
66 ESS_SIGNING_CERT_free,
69 ESS_SIGNING_CERT_V2_dup,
70 ESS_SIGNING_CERT_V2_free,
71 ESS_SIGNING_CERT_V2_it,
72 ESS_SIGNING_CERT_V2_new,
73 EXTENDED_KEY_USAGE_free,
74 EXTENDED_KEY_USAGE_new,
86 IPAddressOrRange_free,
90 ISSUER_SIGN_TOOL_free,
93 ISSUING_DIST_POINT_free,
94 ISSUING_DIST_POINT_it,
95 ISSUING_DIST_POINT_new,
96 NAME_CONSTRAINTS_free,
98 NAMING_AUTHORITY_free,
100 NETSCAPE_CERT_SEQUENCE_free,
101 NETSCAPE_CERT_SEQUENCE_new,
112 OCSP_CERTSTATUS_free,
127 OCSP_REVOKEDINFO_free,
128 OCSP_REVOKEDINFO_new,
129 OCSP_SERVICELOC_free,
133 OCSP_SINGLERESP_free,
140 OSSL_CMP_PKIHEADER_free,
141 OSSL_CMP_PKIHEADER_it,
142 OSSL_CMP_PKIHEADER_new,
147 OSSL_CMP_PKISTATUS_it,
148 OSSL_CRMF_CERTID_dup,
149 OSSL_CRMF_CERTID_free,
151 OSSL_CRMF_CERTID_new,
152 OSSL_CRMF_CERTTEMPLATE_free,
153 OSSL_CRMF_CERTTEMPLATE_it,
154 OSSL_CRMF_CERTTEMPLATE_new,
155 OSSL_CRMF_ENCRYPTEDVALUE_free,
156 OSSL_CRMF_ENCRYPTEDVALUE_it,
157 OSSL_CRMF_ENCRYPTEDVALUE_new,
165 OSSL_CRMF_PBMPARAMETER_free,
166 OSSL_CRMF_PBMPARAMETER_it,
167 OSSL_CRMF_PBMPARAMETER_new,
168 OSSL_CRMF_PKIPUBLICATIONINFO_free,
169 OSSL_CRMF_PKIPUBLICATIONINFO_it,
170 OSSL_CRMF_PKIPUBLICATIONINFO_new,
171 OSSL_CRMF_SINGLEPUBINFO_free,
172 OSSL_CRMF_SINGLEPUBINFO_it,
173 OSSL_CRMF_SINGLEPUBINFO_new,
184 PKCS12_MAC_DATA_free,
194 PKCS7_ENC_CONTENT_free,
195 PKCS7_ENC_CONTENT_new,
198 PKCS7_ISSUER_AND_SERIAL_free,
199 PKCS7_ISSUER_AND_SERIAL_new,
200 PKCS7_RECIP_INFO_free,
201 PKCS7_RECIP_INFO_new,
204 PKCS7_SIGNER_INFO_free,
205 PKCS7_SIGNER_INFO_new,
206 PKCS7_SIGN_ENVELOPE_free,
207 PKCS7_SIGN_ENVELOPE_new,
213 PKCS8_PRIV_KEY_INFO_free,
214 PKCS8_PRIV_KEY_INFO_new,
215 PKEY_USAGE_PERIOD_free,
216 PKEY_USAGE_PERIOD_new,
221 POLICY_CONSTRAINTS_free,
222 POLICY_CONSTRAINTS_new,
225 PROFESSION_INFOS_free,
226 PROFESSION_INFOS_new,
227 PROFESSION_INFO_free,
229 PROXY_CERT_INFO_EXTENSION_free,
230 PROXY_CERT_INFO_EXTENSION_new,
235 RSA_OAEP_PARAMS_free,
288 X509_NAME_ENTRY_free,
307 - ASN1 object utilities
313 #include <openssl/asn1t.h>
315 DECLARE_ASN1_FUNCTIONS(type)
316 IMPLEMENT_ASN1_FUNCTIONS(stname)
318 typedef struct ASN1_ITEM_st ASN1_ITEM;
320 extern const ASN1_ITEM TYPE_it;
321 TYPE *TYPE_new(void);
322 TYPE *TYPE_dup(const TYPE *a);
323 void TYPE_free(TYPE *a);
324 int TYPE_print_ctx(BIO *out, TYPE *a, int indent, const ASN1_PCTX *pctx);
326 The following functions have been deprecated since OpenSSL 3.0, and can be
327 hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
328 see L<openssl_user_macros(7)>:
330 DSA *DSAparams_dup(const DSA *dsa);
331 RSA *RSAPrivateKey_dup(const RSA *rsa);
332 RSA *RSAPublicKey_dup(const RSA *rsa);
336 In the description below, B<I<TYPE>> is used
337 as a placeholder for any of the OpenSSL datatypes, such as B<X509>.
339 The OpenSSL ASN1 parsing library templates are like a data-driven bytecode
341 Every ASN1 object as a global variable, TYPE_it, that describes the item
342 such as its fields. (On systems which cannot export variables from shared
343 libraries, the global is instead a function which returns a pointer to a
346 The macro DECLARE_ASN1_FUNCTIONS() is typically used in header files
347 to generate the function declarations.
349 The macro IMPLEMENT_ASN1_FUNCTIONS() is used once in a source file
350 to generate the function bodies.
353 B<I<TYPE>_new>() allocates an empty object of the indicated type.
354 The object returned must be released by calling B<I<TYPE>_free>().
356 B<I<TYPE>_new_ex>() is similar to B<I<TYPE>_new>() but also passes the
357 library context I<libctx> and the property query I<propq> to use when retrieving
358 algorithms from providers. This created object can then be used when loading
359 binary data using B<d2i_I<TYPE>>().
361 B<I<TYPE>_dup>() copies an existing object, leaving it untouched.
363 B<I<TYPE>_free>() releases the object and all pointers and sub-objects
366 B<I<TYPE>_print_ctx>() prints the object I<a> on the specified BIO I<out>.
367 Each line will be prefixed with I<indent> spaces.
368 The I<pctx> specifies the printing context and is for internal
369 use; use NULL to get the default behavior. If a print function is
370 user-defined, then pass in any I<pctx> down to any nested calls.
374 B<I<TYPE>_new>(), B<I<TYPE>_new_ex>() and B<I<TYPE>_dup>() return a pointer to
375 the object or NULL on failure.
377 B<I<TYPE>_print_ctx>() returns 1 on success or zero on failure.
381 The functions X509_REQ_new_ex(), X509_CRL_new_ex(), PKCS7_new_ex() and
382 CMS_ContentInfo_new_ex() were added in OpenSSL 3.0.
384 The functions DSAparams_dup(), RSAPrivateKey_dup() and RSAPublicKey_dup() were
389 Copyright 2016-2022 The OpenSSL Project Authors. All Rights Reserved.
391 Licensed under the Apache License 2.0 (the "License"). You may not use
392 this file except in compliance with the License. You can obtain a copy
393 in the file LICENSE in the source distribution or at
394 L<https://www.openssl.org/source/license.html>.