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,
34 CMS_ReceiptRequest_free,
35 CMS_ReceiptRequest_new,
59 ESS_ISSUER_SERIAL_dup,
60 ESS_ISSUER_SERIAL_free,
61 ESS_ISSUER_SERIAL_new,
63 ESS_SIGNING_CERT_free,
66 ESS_SIGNING_CERT_V2_dup,
67 ESS_SIGNING_CERT_V2_free,
68 ESS_SIGNING_CERT_V2_it,
69 ESS_SIGNING_CERT_V2_new,
70 EXTENDED_KEY_USAGE_free,
71 EXTENDED_KEY_USAGE_new,
83 IPAddressOrRange_free,
87 ISSUER_SIGN_TOOL_free,
90 ISSUING_DIST_POINT_free,
91 ISSUING_DIST_POINT_it,
92 ISSUING_DIST_POINT_new,
93 NAME_CONSTRAINTS_free,
95 NAMING_AUTHORITY_free,
97 NETSCAPE_CERT_SEQUENCE_free,
98 NETSCAPE_CERT_SEQUENCE_new,
109 OCSP_CERTSTATUS_free,
124 OCSP_REVOKEDINFO_free,
125 OCSP_REVOKEDINFO_new,
126 OCSP_SERVICELOC_free,
130 OCSP_SINGLERESP_free,
137 OSSL_CMP_PKIHEADER_free,
138 OSSL_CMP_PKIHEADER_it,
139 OSSL_CMP_PKIHEADER_new,
144 OSSL_CMP_PKISTATUS_it,
145 OSSL_CRMF_CERTID_dup,
146 OSSL_CRMF_CERTID_free,
148 OSSL_CRMF_CERTID_new,
149 OSSL_CRMF_CERTTEMPLATE_free,
150 OSSL_CRMF_CERTTEMPLATE_it,
151 OSSL_CRMF_CERTTEMPLATE_new,
152 OSSL_CRMF_ENCRYPTEDVALUE_free,
153 OSSL_CRMF_ENCRYPTEDVALUE_it,
154 OSSL_CRMF_ENCRYPTEDVALUE_new,
162 OSSL_CRMF_PBMPARAMETER_free,
163 OSSL_CRMF_PBMPARAMETER_it,
164 OSSL_CRMF_PBMPARAMETER_new,
165 OSSL_CRMF_PKIPUBLICATIONINFO_free,
166 OSSL_CRMF_PKIPUBLICATIONINFO_it,
167 OSSL_CRMF_PKIPUBLICATIONINFO_new,
168 OSSL_CRMF_SINGLEPUBINFO_free,
169 OSSL_CRMF_SINGLEPUBINFO_it,
170 OSSL_CRMF_SINGLEPUBINFO_new,
181 PKCS12_MAC_DATA_free,
191 PKCS7_ENC_CONTENT_free,
192 PKCS7_ENC_CONTENT_new,
195 PKCS7_ISSUER_AND_SERIAL_free,
196 PKCS7_ISSUER_AND_SERIAL_new,
197 PKCS7_RECIP_INFO_free,
198 PKCS7_RECIP_INFO_new,
201 PKCS7_SIGNER_INFO_free,
202 PKCS7_SIGNER_INFO_new,
203 PKCS7_SIGN_ENVELOPE_free,
204 PKCS7_SIGN_ENVELOPE_new,
210 PKCS8_PRIV_KEY_INFO_free,
211 PKCS8_PRIV_KEY_INFO_new,
212 PKEY_USAGE_PERIOD_free,
213 PKEY_USAGE_PERIOD_new,
218 POLICY_CONSTRAINTS_free,
219 POLICY_CONSTRAINTS_new,
222 PROFESSION_INFOS_free,
223 PROFESSION_INFOS_new,
224 PROFESSION_INFO_free,
226 PROXY_CERT_INFO_EXTENSION_free,
227 PROXY_CERT_INFO_EXTENSION_new,
232 RSA_OAEP_PARAMS_free,
285 X509_NAME_ENTRY_free,
304 - ASN1 object utilities
310 #include <openssl/asn1t.h>
312 DECLARE_ASN1_FUNCTIONS(type)
313 IMPLEMENT_ASN1_FUNCTIONS(stname)
315 typedef struct ASN1_ITEM_st ASN1_ITEM;
317 extern const ASN1_ITEM TYPE_it;
318 TYPE *TYPE_new(void);
319 TYPE *TYPE_dup(const TYPE *a);
320 void TYPE_free(TYPE *a);
321 int TYPE_print_ctx(BIO *out, TYPE *a, int indent, const ASN1_PCTX *pctx);
323 The following functions have been deprecated since OpenSSL 3.0, and can be
324 hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
325 see L<openssl_user_macros(7)>:
327 DSA *DSAparams_dup(const DSA *dsa);
328 RSA *RSAPrivateKey_dup(const RSA *rsa);
329 RSA *RSAPublicKey_dup(const RSA *rsa);
333 In the description below, B<I<TYPE>> is used
334 as a placeholder for any of the OpenSSL datatypes, such as B<X509>.
336 The OpenSSL ASN1 parsing library templates are like a data-driven bytecode
338 Every ASN1 object as a global variable, TYPE_it, that describes the item
339 such as its fields. (On systems which cannot export variables from shared
340 libraries, the global is instead a function which returns a pointer to a
343 The macro DECLARE_ASN1_FUNCTIONS() is typically used in header files
344 to generate the function declarations.
346 The macro IMPLEMENT_ASN1_FUNCTIONS() is used once in a source file
347 to generate the function bodies.
350 B<I<TYPE>_new>() allocates an empty object of the indicated type.
351 The object returned must be released by calling B<I<TYPE>_free>().
353 B<I<TYPE>_new_ex>() is similar to B<I<TYPE>_new>() but also passes the
354 library context I<libctx> and the property query I<propq> to use when retrieving
355 algorithms from providers. This created object can then be used when loading
356 binary data using B<d2i_I<TYPE>>().
358 B<I<TYPE>_dup>() copies an existing object, leaving it untouched.
360 B<I<TYPE>_free>() releases the object and all pointers and sub-objects
363 B<I<TYPE>_print_ctx>() prints the object I<a> on the specified BIO I<out>.
364 Each line will be prefixed with I<indent> spaces.
365 The I<pctx> specifies the printing context and is for internal
366 use; use NULL to get the default behavior. If a print function is
367 user-defined, then pass in any I<pctx> down to any nested calls.
371 B<I<TYPE>_new>(), B<I<TYPE>_new_ex>() and B<I<TYPE>_dup>() return a pointer to
372 the object or NULL on failure.
374 B<I<TYPE>_print_ctx>() returns 1 on success or zero on failure.
378 The functions X509_REQ_new_ex(), X509_CRL_new_ex(), PKCS7_new_ex() and
379 CMS_ContentInfo_new_ex() were added in OpenSSL 3.0.
381 The functions DSAparams_dup(), RSAPrivateKey_dup() and RSAPublicKey_dup() were
386 Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
388 Licensed under the Apache License 2.0 (the "License"). You may not use
389 this file except in compliance with the License. You can obtain a copy
390 in the file LICENSE in the source distribution or at
391 L<https://www.openssl.org/source/license.html>.