X509_dup.3ssl - Man Page

ASN1 object utilities

Synopsis

 #include <openssl/asn1t.h>

 DECLARE_ASN1_FUNCTIONS(type)
 IMPLEMENT_ASN1_FUNCTIONS(stname)

 typedef struct ASN1_ITEM_st ASN1_ITEM;

 extern const ASN1_ITEM TYPE_it;
 TYPE *TYPE_new(void);
 TYPE *TYPE_dup(TYPE *a);
 void TYPE_free(TYPE *a);
 int TYPE_print_ctx(BIO *out, TYPE *a, int indent, const ASN1_PCTX *pctx);

Description

In the description below, TYPE is used as a placeholder for any of the OpenSSL datatypes, such as X509.

The OpenSSL ASN1 parsing library templates are like a data-driven bytecode interpreter. Every ASN1 object as a global variable, TYPE_it, that describes the item such as its fields.  (On systems which cannot export variables from shared libraries, the global is instead a function which returns a pointer to a static variable.

The macro DECLARE_ASN1_FUNCTIONS() is typically used in header files to generate the function declarations.

The macro IMPLEMENT_ASN1_FUNCTIONS() is used once in a source file to generate the function bodies.

TYPE_new() allocates an empty object of the indicated type. The object returned must be released by calling TYPE_free().

TYPE_dup() copies an existing object.

TYPE_free() releases the object and all pointers and sub-objects within it.

TYPE_print_ctx() prints the object a on the specified BIO out. Each line will be prefixed with indent spaces. The pctx specifies the printing context and is for internal use; use NULL to get the default behavior.  If a print function is user-defined, then pass in any pctx down to any nested calls.

Return Values

TYPE_new() and TYPE_dup() return a pointer to the object or NULL on failure.

TYPE_print_ctx() returns 1 on success or zero on failure.

Referenced By

ADMISSIONS.3ssl(3).

The man pages ACCESS_DESCRIPTION_free.3ssl(3), ACCESS_DESCRIPTION_new.3ssl(3), ADMISSIONS_free.3ssl(3), ADMISSIONS_new.3ssl(3), ADMISSION_SYNTAX_free.3ssl(3), ADMISSION_SYNTAX_new.3ssl(3), ASIdentifierChoice_free.3ssl(3), ASIdentifierChoice_new.3ssl(3), ASIdentifiers_free.3ssl(3), ASIdentifiers_new.3ssl(3), ASIdOrRange_free.3ssl(3), ASIdOrRange_new.3ssl(3), ASN1_ITEM.3ssl(3), ASRange_free.3ssl(3), ASRange_new.3ssl(3), AUTHORITY_INFO_ACCESS_free.3ssl(3), AUTHORITY_INFO_ACCESS_new.3ssl(3), AUTHORITY_KEYID_free.3ssl(3), AUTHORITY_KEYID_new.3ssl(3), BASIC_CONSTRAINTS_free.3ssl(3), BASIC_CONSTRAINTS_new.3ssl(3), CERTIFICATEPOLICIES_free.3ssl(3), CERTIFICATEPOLICIES_new.3ssl(3), CMS_ContentInfo_free.3ssl(3), CMS_ContentInfo_new.3ssl(3), CMS_ContentInfo_print_ctx.3ssl(3), CMS_ReceiptRequest_free.3ssl(3), CMS_ReceiptRequest_new.3ssl(3), CRL_DIST_POINTS_free.3ssl(3), CRL_DIST_POINTS_new.3ssl(3), DECLARE_ASN1_FUNCTIONS.3ssl(3), DIRECTORYSTRING_free.3ssl(3), DIRECTORYSTRING_new.3ssl(3), DISPLAYTEXT_free.3ssl(3), DISPLAYTEXT_new.3ssl(3), DIST_POINT_free.3ssl(3), DIST_POINT_NAME_free.3ssl(3), DIST_POINT_NAME_new.3ssl(3), DIST_POINT_new.3ssl(3), DSAparams_dup.3ssl(3), ECPARAMETERS_free.3ssl(3), ECPARAMETERS_new.3ssl(3), ECPKPARAMETERS_free.3ssl(3), ECPKPARAMETERS_new.3ssl(3), EDIPARTYNAME_free.3ssl(3), EDIPARTYNAME_new.3ssl(3), ESS_CERT_ID_dup.3ssl(3), ESS_CERT_ID_free.3ssl(3), ESS_CERT_ID_new.3ssl(3), ESS_ISSUER_SERIAL_dup.3ssl(3), ESS_ISSUER_SERIAL_free.3ssl(3), ESS_ISSUER_SERIAL_new.3ssl(3), ESS_SIGNING_CERT_dup.3ssl(3), ESS_SIGNING_CERT_free.3ssl(3), ESS_SIGNING_CERT_new.3ssl(3), EXTENDED_KEY_USAGE_free.3ssl(3), EXTENDED_KEY_USAGE_new.3ssl(3), GENERAL_NAME_dup.3ssl(3), GENERAL_NAME_free.3ssl(3), GENERAL_NAME_new.3ssl(3), GENERAL_NAMES_free.3ssl(3), GENERAL_NAMES_new.3ssl(3), GENERAL_SUBTREE_free.3ssl(3), GENERAL_SUBTREE_new.3ssl(3), IMPLEMENT_ASN1_FUNCTIONS.3ssl(3), IPAddressChoice_free.3ssl(3), IPAddressChoice_new.3ssl(3), IPAddressFamily_free.3ssl(3), IPAddressFamily_new.3ssl(3), IPAddressOrRange_free.3ssl(3), IPAddressOrRange_new.3ssl(3), IPAddressRange_free.3ssl(3), IPAddressRange_new.3ssl(3), ISSUING_DIST_POINT_free.3ssl(3), ISSUING_DIST_POINT_new.3ssl(3), NAME_CONSTRAINTS_free.3ssl(3), NAME_CONSTRAINTS_new.3ssl(3), NAMING_AUTHORITY_free.3ssl(3), NAMING_AUTHORITY_new.3ssl(3), NETSCAPE_CERT_SEQUENCE_free.3ssl(3), NETSCAPE_CERT_SEQUENCE_new.3ssl(3), NETSCAPE_SPKAC_free.3ssl(3), NETSCAPE_SPKAC_new.3ssl(3), NETSCAPE_SPKI_free.3ssl(3), NETSCAPE_SPKI_new.3ssl(3), NOTICEREF_free.3ssl(3), NOTICEREF_new.3ssl(3), OCSP_BASICRESP_free.3ssl(3), OCSP_BASICRESP_new.3ssl(3), OCSP_CERTID_dup.3ssl(3), OCSP_CERTID_new.3ssl(3), OCSP_CERTSTATUS_free.3ssl(3), OCSP_CERTSTATUS_new.3ssl(3), OCSP_CRLID_free.3ssl(3), OCSP_CRLID_new.3ssl(3), OCSP_ONEREQ_free.3ssl(3), OCSP_ONEREQ_new.3ssl(3), OCSP_REQINFO_free.3ssl(3), OCSP_REQINFO_new.3ssl(3), OCSP_RESPBYTES_free.3ssl(3), OCSP_RESPBYTES_new.3ssl(3), OCSP_RESPDATA_free.3ssl(3), OCSP_RESPDATA_new.3ssl(3), OCSP_RESPID_free.3ssl(3), OCSP_RESPID_new.3ssl(3), OCSP_RESPONSE_new.3ssl(3), OCSP_REVOKEDINFO_free.3ssl(3), OCSP_REVOKEDINFO_new.3ssl(3), OCSP_SERVICELOC_free.3ssl(3), OCSP_SERVICELOC_new.3ssl(3), OCSP_SIGNATURE_free.3ssl(3), OCSP_SIGNATURE_new.3ssl(3), OCSP_SINGLERESP_free.3ssl(3), OCSP_SINGLERESP_new.3ssl(3), OTHERNAME_free.3ssl(3), OTHERNAME_new.3ssl(3), PBE2PARAM_free.3ssl(3), PBE2PARAM_new.3ssl(3), PBEPARAM_free.3ssl(3), PBEPARAM_new.3ssl(3), PBKDF2PARAM_free.3ssl(3), PBKDF2PARAM_new.3ssl(3), PKCS12_BAGS_free.3ssl(3), PKCS12_BAGS_new.3ssl(3), PKCS12_free.3ssl(3), PKCS12_MAC_DATA_free.3ssl(3), PKCS12_MAC_DATA_new.3ssl(3), PKCS12_new.3ssl(3), PKCS12_SAFEBAG_free.3ssl(3), PKCS12_SAFEBAG_new.3ssl(3), PKCS7_DIGEST_free.3ssl(3), PKCS7_DIGEST_new.3ssl(3), PKCS7_dup.3ssl(3), PKCS7_ENC_CONTENT_free.3ssl(3), PKCS7_ENC_CONTENT_new.3ssl(3), PKCS7_ENCRYPT_free.3ssl(3), PKCS7_ENCRYPT_new.3ssl(3), PKCS7_ENVELOPE_free.3ssl(3), PKCS7_ENVELOPE_new.3ssl(3), PKCS7_free.3ssl(3), PKCS7_ISSUER_AND_SERIAL_free.3ssl(3), PKCS7_ISSUER_AND_SERIAL_new.3ssl(3), PKCS7_new.3ssl(3), PKCS7_print_ctx.3ssl(3), PKCS7_RECIP_INFO_free.3ssl(3), PKCS7_RECIP_INFO_new.3ssl(3), PKCS7_SIGNED_free.3ssl(3), PKCS7_SIGNED_new.3ssl(3), PKCS7_SIGN_ENVELOPE_free.3ssl(3), PKCS7_SIGN_ENVELOPE_new.3ssl(3), PKCS7_SIGNER_INFO_free.3ssl(3), PKCS7_SIGNER_INFO_new.3ssl(3), PKCS8_PRIV_KEY_INFO_free.3ssl(3), PKCS8_PRIV_KEY_INFO_new.3ssl(3), PKEY_USAGE_PERIOD_free.3ssl(3), PKEY_USAGE_PERIOD_new.3ssl(3), POLICY_CONSTRAINTS_free.3ssl(3), POLICY_CONSTRAINTS_new.3ssl(3), POLICYINFO_free.3ssl(3), POLICYINFO_new.3ssl(3), POLICY_MAPPING_free.3ssl(3), POLICY_MAPPING_new.3ssl(3), POLICYQUALINFO_free.3ssl(3), POLICYQUALINFO_new.3ssl(3), PROFESSION_INFO_free.3ssl(3), PROFESSION_INFO_new.3ssl(3), PROFESSION_INFOS_free.3ssl(3), PROFESSION_INFOS_new.3ssl(3), PROXY_CERT_INFO_EXTENSION_free.3ssl(3), PROXY_CERT_INFO_EXTENSION_new.3ssl(3), PROXY_POLICY_free.3ssl(3), PROXY_POLICY_new.3ssl(3), RSA_OAEP_PARAMS_free.3ssl(3), RSA_OAEP_PARAMS_new.3ssl(3), RSAPrivateKey_dup.3ssl(3), RSA_PSS_PARAMS_free.3ssl(3), RSA_PSS_PARAMS_new.3ssl(3), RSAPublicKey_dup.3ssl(3), SCRYPT_PARAMS_free.3ssl(3), SCRYPT_PARAMS_new.3ssl(3), SXNET_free.3ssl(3), SXNETID_free.3ssl(3), SXNETID_new.3ssl(3), SXNET_new.3ssl(3), TLS_FEATURE_free.3ssl(3), TLS_FEATURE_new.3ssl(3), TS_ACCURACY_dup.3ssl(3), TS_ACCURACY_free.3ssl(3), TS_ACCURACY_new.3ssl(3), TS_MSG_IMPRINT_dup.3ssl(3), TS_MSG_IMPRINT_free.3ssl(3), TS_MSG_IMPRINT_new.3ssl(3), TS_REQ_dup.3ssl(3), TS_REQ_free.3ssl(3), TS_REQ_new.3ssl(3), TS_RESP_dup.3ssl(3), TS_RESP_free.3ssl(3), TS_RESP_new.3ssl(3), TS_STATUS_INFO_dup.3ssl(3), TS_STATUS_INFO_free.3ssl(3), TS_STATUS_INFO_new.3ssl(3), TS_TST_INFO_dup.3ssl(3), TS_TST_INFO_free.3ssl(3), TS_TST_INFO_new.3ssl(3), USERNOTICE_free.3ssl(3), USERNOTICE_new.3ssl(3), X509_ALGOR_free.3ssl(3), X509_ALGOR_new.3ssl(3), X509_ATTRIBUTE_dup.3ssl(3), X509_ATTRIBUTE_free.3ssl(3), X509_ATTRIBUTE_new.3ssl(3), X509_CERT_AUX_free.3ssl(3), X509_CERT_AUX_new.3ssl(3), X509_CINF_free.3ssl(3), X509_CINF_new.3ssl(3), X509_CRL_dup.3ssl(3), X509_CRL_free.3ssl(3), X509_CRL_INFO_free.3ssl(3), X509_CRL_INFO_new.3ssl(3), X509_CRL_new.3ssl(3), X509_EXTENSION_dup.3ssl(3), X509_EXTENSION_free.3ssl(3), X509_EXTENSION_new.3ssl(3), X509_NAME_dup.3ssl(3), X509_NAME_ENTRY_dup.3ssl(3), X509_NAME_ENTRY_free.3ssl(3), X509_NAME_ENTRY_new.3ssl(3), X509_NAME_free.3ssl(3), X509_NAME_new.3ssl(3), X509_REQ_dup.3ssl(3), X509_REQ_free.3ssl(3), X509_REQ_INFO_free.3ssl(3), X509_REQ_INFO_new.3ssl(3), X509_REQ_new.3ssl(3), X509_REVOKED_dup.3ssl(3), X509_REVOKED_free.3ssl(3), X509_REVOKED_new.3ssl(3), X509_SIG_free.3ssl(3), X509_SIG_new.3ssl(3), X509_VAL_free.3ssl(3) and X509_VAL_new.3ssl(3) are aliases of X509_dup.3ssl(3).

2021-03-26 1.1.1k OpenSSL