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,
65 ESS_SIGNING_CERT_V2_dup,
66 ESS_SIGNING_CERT_V2_free,
67 ESS_SIGNING_CERT_V2_new,
68 EXTENDED_KEY_USAGE_free,
69 EXTENDED_KEY_USAGE_new,
81 IPAddressOrRange_free,
85 ISSUER_SIGN_TOOL_free,
88 ISSUING_DIST_POINT_free,
89 ISSUING_DIST_POINT_it,
90 ISSUING_DIST_POINT_new,
91 NAME_CONSTRAINTS_free,
93 NAMING_AUTHORITY_free,
95 NETSCAPE_CERT_SEQUENCE_free,
96 NETSCAPE_CERT_SEQUENCE_new,
107 OCSP_CERTSTATUS_free,
122 OCSP_REVOKEDINFO_free,
123 OCSP_REVOKEDINFO_new,
124 OCSP_SERVICELOC_free,
128 OCSP_SINGLERESP_free,
135 OSSL_CMP_PKIHEADER_free,
136 OSSL_CMP_PKIHEADER_it,
137 OSSL_CMP_PKIHEADER_new,
142 OSSL_CMP_PKISTATUS_it,
143 OSSL_CRMF_CERTID_dup,
144 OSSL_CRMF_CERTID_free,
146 OSSL_CRMF_CERTID_new,
147 OSSL_CRMF_CERTTEMPLATE_free,
148 OSSL_CRMF_CERTTEMPLATE_it,
149 OSSL_CRMF_CERTTEMPLATE_new,
150 OSSL_CRMF_ENCRYPTEDVALUE_free,
151 OSSL_CRMF_ENCRYPTEDVALUE_it,
152 OSSL_CRMF_ENCRYPTEDVALUE_new,
160 OSSL_CRMF_PBMPARAMETER_free,
161 OSSL_CRMF_PBMPARAMETER_it,
162 OSSL_CRMF_PBMPARAMETER_new,
163 OSSL_CRMF_PKIPUBLICATIONINFO_free,
164 OSSL_CRMF_PKIPUBLICATIONINFO_it,
165 OSSL_CRMF_PKIPUBLICATIONINFO_new,
166 OSSL_CRMF_SINGLEPUBINFO_free,
167 OSSL_CRMF_SINGLEPUBINFO_it,
168 OSSL_CRMF_SINGLEPUBINFO_new,
179 PKCS12_MAC_DATA_free,
189 PKCS7_ENC_CONTENT_free,
190 PKCS7_ENC_CONTENT_new,
193 PKCS7_ISSUER_AND_SERIAL_free,
194 PKCS7_ISSUER_AND_SERIAL_new,
195 PKCS7_RECIP_INFO_free,
196 PKCS7_RECIP_INFO_new,
199 PKCS7_SIGNER_INFO_free,
200 PKCS7_SIGNER_INFO_new,
201 PKCS7_SIGN_ENVELOPE_free,
202 PKCS7_SIGN_ENVELOPE_new,
208 PKCS8_PRIV_KEY_INFO_free,
209 PKCS8_PRIV_KEY_INFO_new,
210 PKEY_USAGE_PERIOD_free,
211 PKEY_USAGE_PERIOD_new,
216 POLICY_CONSTRAINTS_free,
217 POLICY_CONSTRAINTS_new,
220 PROFESSION_INFOS_free,
221 PROFESSION_INFOS_new,
222 PROFESSION_INFO_free,
224 PROXY_CERT_INFO_EXTENSION_free,
225 PROXY_CERT_INFO_EXTENSION_new,
230 RSA_OAEP_PARAMS_free,
282 X509_NAME_ENTRY_free,
301 - ASN1 object utilities
307 #include <openssl/asn1t.h>
309 DECLARE_ASN1_FUNCTIONS(type)
310 IMPLEMENT_ASN1_FUNCTIONS(stname)
312 typedef struct ASN1_ITEM_st ASN1_ITEM;
314 extern const ASN1_ITEM TYPE_it;
315 TYPE *TYPE_new(void);
316 TYPE *TYPE_dup(const TYPE *a);
317 void TYPE_free(TYPE *a);
318 int TYPE_print_ctx(BIO *out, TYPE *a, int indent, const ASN1_PCTX *pctx);
320 Deprecated since OpenSSL 3.0, can be hidden entirely by defining
321 B<OPENSSL_API_COMPAT> with a suitable version value, see
322 L<openssl_user_macros(7)>:
324 DSA *DSAparams_dup(const DSA *dsa);
325 RSA *RSAPrivateKey_dup(const RSA *rsa);
326 RSA *RSAPublicKey_dup(const RSA *rsa);
330 In the description below, B<I<TYPE>> is used
331 as a placeholder for any of the OpenSSL datatypes, such as B<X509>.
333 The OpenSSL ASN1 parsing library templates are like a data-driven bytecode
335 Every ASN1 object as a global variable, TYPE_it, that describes the item
336 such as its fields. (On systems which cannot export variables from shared
337 libraries, the global is instead a function which returns a pointer to a
340 The macro DECLARE_ASN1_FUNCTIONS() is typically used in header files
341 to generate the function declarations.
343 The macro IMPLEMENT_ASN1_FUNCTIONS() is used once in a source file
344 to generate the function bodies.
347 B<I<TYPE>_new>() allocates an empty object of the indicated type.
348 The object returned must be released by calling B<I<TYPE>_free>().
350 B<I<TYPE>_new_ex>() is similiar to B<I<TYPE>_new>() but also passes the
351 library context I<libctx> and the property query I<propq> to use when retrieving
352 algorithms from providers.
354 B<I<TYPE>_dup>() copies an existing object, leaving it untouched.
356 B<I<TYPE>_free>() releases the object and all pointers and sub-objects
359 B<I<TYPE>_print_ctx>() prints the object I<a> on the specified BIO I<out>.
360 Each line will be prefixed with I<indent> spaces.
361 The I<pctx> specifies the printing context and is for internal
362 use; use NULL to get the default behavior. If a print function is
363 user-defined, then pass in any I<pctx> down to any nested calls.
367 B<I<TYPE>_new>(), B<I<TYPE>_new_ex>() and B<I<TYPE>_dup>() return a pointer to
368 the object or NULL on failure.
370 B<I<TYPE>_print_ctx>() returns 1 on success or zero on failure.
374 The functions PKCS7_new_ex() and CMS_ContentInfo_new_ex() were
375 added in OpenSSL 3.0.
377 The functions DSAparams_dup(), RSAPrivateKey_dup() and RSAPublicKey_dup() were
382 Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
384 Licensed under the Apache License 2.0 (the "License"). You may not use
385 this file except in compliance with the License. You can obtain a copy
386 in the file LICENSE in the source distribution or at
387 L<https://www.openssl.org/source/license.html>.