xref: /netbsd-src/crypto/external/bsd/openssl.old/dist/doc/man3/X509_dup.pod (revision 4724848cf0da353df257f730694b7882798e5daf)
1*4724848cSchristos=pod
2*4724848cSchristos
3*4724848cSchristos=head1 NAME
4*4724848cSchristos
5*4724848cSchristosDECLARE_ASN1_FUNCTIONS,
6*4724848cSchristosIMPLEMENT_ASN1_FUNCTIONS,
7*4724848cSchristosASN1_ITEM,
8*4724848cSchristosACCESS_DESCRIPTION_free,
9*4724848cSchristosACCESS_DESCRIPTION_new,
10*4724848cSchristosADMISSIONS_free,
11*4724848cSchristosADMISSIONS_new,
12*4724848cSchristosADMISSION_SYNTAX_free,
13*4724848cSchristosADMISSION_SYNTAX_new,
14*4724848cSchristosASIdOrRange_free,
15*4724848cSchristosASIdOrRange_new,
16*4724848cSchristosASIdentifierChoice_free,
17*4724848cSchristosASIdentifierChoice_new,
18*4724848cSchristosASIdentifiers_free,
19*4724848cSchristosASIdentifiers_new,
20*4724848cSchristosASRange_free,
21*4724848cSchristosASRange_new,
22*4724848cSchristosAUTHORITY_INFO_ACCESS_free,
23*4724848cSchristosAUTHORITY_INFO_ACCESS_new,
24*4724848cSchristosAUTHORITY_KEYID_free,
25*4724848cSchristosAUTHORITY_KEYID_new,
26*4724848cSchristosBASIC_CONSTRAINTS_free,
27*4724848cSchristosBASIC_CONSTRAINTS_new,
28*4724848cSchristosCERTIFICATEPOLICIES_free,
29*4724848cSchristosCERTIFICATEPOLICIES_new,
30*4724848cSchristosCMS_ContentInfo_free,
31*4724848cSchristosCMS_ContentInfo_new,
32*4724848cSchristosCMS_ContentInfo_print_ctx,
33*4724848cSchristosCMS_ReceiptRequest_free,
34*4724848cSchristosCMS_ReceiptRequest_new,
35*4724848cSchristosCRL_DIST_POINTS_free,
36*4724848cSchristosCRL_DIST_POINTS_new,
37*4724848cSchristosDIRECTORYSTRING_free,
38*4724848cSchristosDIRECTORYSTRING_new,
39*4724848cSchristosDISPLAYTEXT_free,
40*4724848cSchristosDISPLAYTEXT_new,
41*4724848cSchristosDIST_POINT_NAME_free,
42*4724848cSchristosDIST_POINT_NAME_new,
43*4724848cSchristosDIST_POINT_free,
44*4724848cSchristosDIST_POINT_new,
45*4724848cSchristosDSAparams_dup,
46*4724848cSchristosECPARAMETERS_free,
47*4724848cSchristosECPARAMETERS_new,
48*4724848cSchristosECPKPARAMETERS_free,
49*4724848cSchristosECPKPARAMETERS_new,
50*4724848cSchristosEDIPARTYNAME_free,
51*4724848cSchristosEDIPARTYNAME_new,
52*4724848cSchristosESS_CERT_ID_dup,
53*4724848cSchristosESS_CERT_ID_free,
54*4724848cSchristosESS_CERT_ID_new,
55*4724848cSchristosESS_ISSUER_SERIAL_dup,
56*4724848cSchristosESS_ISSUER_SERIAL_free,
57*4724848cSchristosESS_ISSUER_SERIAL_new,
58*4724848cSchristosESS_SIGNING_CERT_dup,
59*4724848cSchristosESS_SIGNING_CERT_free,
60*4724848cSchristosESS_SIGNING_CERT_new,
61*4724848cSchristosEXTENDED_KEY_USAGE_free,
62*4724848cSchristosEXTENDED_KEY_USAGE_new,
63*4724848cSchristosGENERAL_NAMES_free,
64*4724848cSchristosGENERAL_NAMES_new,
65*4724848cSchristosGENERAL_NAME_dup,
66*4724848cSchristosGENERAL_NAME_free,
67*4724848cSchristosGENERAL_NAME_new,
68*4724848cSchristosGENERAL_SUBTREE_free,
69*4724848cSchristosGENERAL_SUBTREE_new,
70*4724848cSchristosIPAddressChoice_free,
71*4724848cSchristosIPAddressChoice_new,
72*4724848cSchristosIPAddressFamily_free,
73*4724848cSchristosIPAddressFamily_new,
74*4724848cSchristosIPAddressOrRange_free,
75*4724848cSchristosIPAddressOrRange_new,
76*4724848cSchristosIPAddressRange_free,
77*4724848cSchristosIPAddressRange_new,
78*4724848cSchristosISSUING_DIST_POINT_free,
79*4724848cSchristosISSUING_DIST_POINT_new,
80*4724848cSchristosNAME_CONSTRAINTS_free,
81*4724848cSchristosNAME_CONSTRAINTS_new,
82*4724848cSchristosNAMING_AUTHORITY_free,
83*4724848cSchristosNAMING_AUTHORITY_new,
84*4724848cSchristosNETSCAPE_CERT_SEQUENCE_free,
85*4724848cSchristosNETSCAPE_CERT_SEQUENCE_new,
86*4724848cSchristosNETSCAPE_SPKAC_free,
87*4724848cSchristosNETSCAPE_SPKAC_new,
88*4724848cSchristosNETSCAPE_SPKI_free,
89*4724848cSchristosNETSCAPE_SPKI_new,
90*4724848cSchristosNOTICEREF_free,
91*4724848cSchristosNOTICEREF_new,
92*4724848cSchristosOCSP_BASICRESP_free,
93*4724848cSchristosOCSP_BASICRESP_new,
94*4724848cSchristosOCSP_CERTID_dup,
95*4724848cSchristosOCSP_CERTID_new,
96*4724848cSchristosOCSP_CERTSTATUS_free,
97*4724848cSchristosOCSP_CERTSTATUS_new,
98*4724848cSchristosOCSP_CRLID_free,
99*4724848cSchristosOCSP_CRLID_new,
100*4724848cSchristosOCSP_ONEREQ_free,
101*4724848cSchristosOCSP_ONEREQ_new,
102*4724848cSchristosOCSP_REQINFO_free,
103*4724848cSchristosOCSP_REQINFO_new,
104*4724848cSchristosOCSP_RESPBYTES_free,
105*4724848cSchristosOCSP_RESPBYTES_new,
106*4724848cSchristosOCSP_RESPDATA_free,
107*4724848cSchristosOCSP_RESPDATA_new,
108*4724848cSchristosOCSP_RESPID_free,
109*4724848cSchristosOCSP_RESPID_new,
110*4724848cSchristosOCSP_RESPONSE_new,
111*4724848cSchristosOCSP_REVOKEDINFO_free,
112*4724848cSchristosOCSP_REVOKEDINFO_new,
113*4724848cSchristosOCSP_SERVICELOC_free,
114*4724848cSchristosOCSP_SERVICELOC_new,
115*4724848cSchristosOCSP_SIGNATURE_free,
116*4724848cSchristosOCSP_SIGNATURE_new,
117*4724848cSchristosOCSP_SINGLERESP_free,
118*4724848cSchristosOCSP_SINGLERESP_new,
119*4724848cSchristosOTHERNAME_free,
120*4724848cSchristosOTHERNAME_new,
121*4724848cSchristosPBE2PARAM_free,
122*4724848cSchristosPBE2PARAM_new,
123*4724848cSchristosPBEPARAM_free,
124*4724848cSchristosPBEPARAM_new,
125*4724848cSchristosPBKDF2PARAM_free,
126*4724848cSchristosPBKDF2PARAM_new,
127*4724848cSchristosPKCS12_BAGS_free,
128*4724848cSchristosPKCS12_BAGS_new,
129*4724848cSchristosPKCS12_MAC_DATA_free,
130*4724848cSchristosPKCS12_MAC_DATA_new,
131*4724848cSchristosPKCS12_SAFEBAG_free,
132*4724848cSchristosPKCS12_SAFEBAG_new,
133*4724848cSchristosPKCS12_free,
134*4724848cSchristosPKCS12_new,
135*4724848cSchristosPKCS7_DIGEST_free,
136*4724848cSchristosPKCS7_DIGEST_new,
137*4724848cSchristosPKCS7_ENCRYPT_free,
138*4724848cSchristosPKCS7_ENCRYPT_new,
139*4724848cSchristosPKCS7_ENC_CONTENT_free,
140*4724848cSchristosPKCS7_ENC_CONTENT_new,
141*4724848cSchristosPKCS7_ENVELOPE_free,
142*4724848cSchristosPKCS7_ENVELOPE_new,
143*4724848cSchristosPKCS7_ISSUER_AND_SERIAL_free,
144*4724848cSchristosPKCS7_ISSUER_AND_SERIAL_new,
145*4724848cSchristosPKCS7_RECIP_INFO_free,
146*4724848cSchristosPKCS7_RECIP_INFO_new,
147*4724848cSchristosPKCS7_SIGNED_free,
148*4724848cSchristosPKCS7_SIGNED_new,
149*4724848cSchristosPKCS7_SIGNER_INFO_free,
150*4724848cSchristosPKCS7_SIGNER_INFO_new,
151*4724848cSchristosPKCS7_SIGN_ENVELOPE_free,
152*4724848cSchristosPKCS7_SIGN_ENVELOPE_new,
153*4724848cSchristosPKCS7_dup,
154*4724848cSchristosPKCS7_free,
155*4724848cSchristosPKCS7_new,
156*4724848cSchristosPKCS7_print_ctx,
157*4724848cSchristosPKCS8_PRIV_KEY_INFO_free,
158*4724848cSchristosPKCS8_PRIV_KEY_INFO_new,
159*4724848cSchristosPKEY_USAGE_PERIOD_free,
160*4724848cSchristosPKEY_USAGE_PERIOD_new,
161*4724848cSchristosPOLICYINFO_free,
162*4724848cSchristosPOLICYINFO_new,
163*4724848cSchristosPOLICYQUALINFO_free,
164*4724848cSchristosPOLICYQUALINFO_new,
165*4724848cSchristosPOLICY_CONSTRAINTS_free,
166*4724848cSchristosPOLICY_CONSTRAINTS_new,
167*4724848cSchristosPOLICY_MAPPING_free,
168*4724848cSchristosPOLICY_MAPPING_new,
169*4724848cSchristosPROFESSION_INFO_free,
170*4724848cSchristosPROFESSION_INFO_new,
171*4724848cSchristosPROFESSION_INFOS_free,
172*4724848cSchristosPROFESSION_INFOS_new,
173*4724848cSchristosPROXY_CERT_INFO_EXTENSION_free,
174*4724848cSchristosPROXY_CERT_INFO_EXTENSION_new,
175*4724848cSchristosPROXY_POLICY_free,
176*4724848cSchristosPROXY_POLICY_new,
177*4724848cSchristosRSAPrivateKey_dup,
178*4724848cSchristosRSAPublicKey_dup,
179*4724848cSchristosRSA_OAEP_PARAMS_free,
180*4724848cSchristosRSA_OAEP_PARAMS_new,
181*4724848cSchristosRSA_PSS_PARAMS_free,
182*4724848cSchristosRSA_PSS_PARAMS_new,
183*4724848cSchristosSCRYPT_PARAMS_free,
184*4724848cSchristosSCRYPT_PARAMS_new,
185*4724848cSchristosSXNETID_free,
186*4724848cSchristosSXNETID_new,
187*4724848cSchristosSXNET_free,
188*4724848cSchristosSXNET_new,
189*4724848cSchristosTLS_FEATURE_free,
190*4724848cSchristosTLS_FEATURE_new,
191*4724848cSchristosTS_ACCURACY_dup,
192*4724848cSchristosTS_ACCURACY_free,
193*4724848cSchristosTS_ACCURACY_new,
194*4724848cSchristosTS_MSG_IMPRINT_dup,
195*4724848cSchristosTS_MSG_IMPRINT_free,
196*4724848cSchristosTS_MSG_IMPRINT_new,
197*4724848cSchristosTS_REQ_dup,
198*4724848cSchristosTS_REQ_free,
199*4724848cSchristosTS_REQ_new,
200*4724848cSchristosTS_RESP_dup,
201*4724848cSchristosTS_RESP_free,
202*4724848cSchristosTS_RESP_new,
203*4724848cSchristosTS_STATUS_INFO_dup,
204*4724848cSchristosTS_STATUS_INFO_free,
205*4724848cSchristosTS_STATUS_INFO_new,
206*4724848cSchristosTS_TST_INFO_dup,
207*4724848cSchristosTS_TST_INFO_free,
208*4724848cSchristosTS_TST_INFO_new,
209*4724848cSchristosUSERNOTICE_free,
210*4724848cSchristosUSERNOTICE_new,
211*4724848cSchristosX509_ALGOR_free,
212*4724848cSchristosX509_ALGOR_new,
213*4724848cSchristosX509_ATTRIBUTE_dup,
214*4724848cSchristosX509_ATTRIBUTE_free,
215*4724848cSchristosX509_ATTRIBUTE_new,
216*4724848cSchristosX509_CERT_AUX_free,
217*4724848cSchristosX509_CERT_AUX_new,
218*4724848cSchristosX509_CINF_free,
219*4724848cSchristosX509_CINF_new,
220*4724848cSchristosX509_CRL_INFO_free,
221*4724848cSchristosX509_CRL_INFO_new,
222*4724848cSchristosX509_CRL_dup,
223*4724848cSchristosX509_CRL_free,
224*4724848cSchristosX509_CRL_new,
225*4724848cSchristosX509_EXTENSION_dup,
226*4724848cSchristosX509_EXTENSION_free,
227*4724848cSchristosX509_EXTENSION_new,
228*4724848cSchristosX509_NAME_ENTRY_dup,
229*4724848cSchristosX509_NAME_ENTRY_free,
230*4724848cSchristosX509_NAME_ENTRY_new,
231*4724848cSchristosX509_NAME_dup,
232*4724848cSchristosX509_NAME_free,
233*4724848cSchristosX509_NAME_new,
234*4724848cSchristosX509_REQ_INFO_free,
235*4724848cSchristosX509_REQ_INFO_new,
236*4724848cSchristosX509_REQ_dup,
237*4724848cSchristosX509_REQ_free,
238*4724848cSchristosX509_REQ_new,
239*4724848cSchristosX509_REVOKED_dup,
240*4724848cSchristosX509_REVOKED_free,
241*4724848cSchristosX509_REVOKED_new,
242*4724848cSchristosX509_SIG_free,
243*4724848cSchristosX509_SIG_new,
244*4724848cSchristosX509_VAL_free,
245*4724848cSchristosX509_VAL_new,
246*4724848cSchristosX509_dup,
247*4724848cSchristos- ASN1 object utilities
248*4724848cSchristos
249*4724848cSchristos=head1 SYNOPSIS
250*4724848cSchristos
251*4724848cSchristos=for comment generic
252*4724848cSchristos
253*4724848cSchristos #include <openssl/asn1t.h>
254*4724848cSchristos
255*4724848cSchristos DECLARE_ASN1_FUNCTIONS(type)
256*4724848cSchristos IMPLEMENT_ASN1_FUNCTIONS(stname)
257*4724848cSchristos
258*4724848cSchristos typedef struct ASN1_ITEM_st ASN1_ITEM;
259*4724848cSchristos
260*4724848cSchristos extern const ASN1_ITEM TYPE_it;
261*4724848cSchristos TYPE *TYPE_new(void);
262*4724848cSchristos TYPE *TYPE_dup(TYPE *a);
263*4724848cSchristos void TYPE_free(TYPE *a);
264*4724848cSchristos int TYPE_print_ctx(BIO *out, TYPE *a, int indent, const ASN1_PCTX *pctx);
265*4724848cSchristos
266*4724848cSchristos=head1 DESCRIPTION
267*4724848cSchristos
268*4724848cSchristosIn the description below, I<TYPE> is used
269*4724848cSchristosas a placeholder for any of the OpenSSL datatypes, such as I<X509>.
270*4724848cSchristos
271*4724848cSchristosThe OpenSSL ASN1 parsing library templates are like a data-driven bytecode
272*4724848cSchristosinterpreter.
273*4724848cSchristosEvery ASN1 object as a global variable, TYPE_it, that describes the item
274*4724848cSchristossuch as its fields.  (On systems which cannot export variables from shared
275*4724848cSchristoslibraries, the global is instead a function which returns a pointer to a
276*4724848cSchristosstatic variable.
277*4724848cSchristos
278*4724848cSchristosThe macro DECLARE_ASN1_FUNCTIONS() is typically used in header files
279*4724848cSchristosto generate the function declarations.
280*4724848cSchristos
281*4724848cSchristosThe macro IMPLEMENT_ASN1_FUNCTIONS() is used once in a source file
282*4724848cSchristosto generate the function bodies.
283*4724848cSchristos
284*4724848cSchristos
285*4724848cSchristosTYPE_new() allocates an empty object of the indicated type.
286*4724848cSchristosThe object returned must be released by calling TYPE_free().
287*4724848cSchristos
288*4724848cSchristosTYPE_dup() copies an existing object.
289*4724848cSchristos
290*4724848cSchristosTYPE_free() releases the object and all pointers and sub-objects
291*4724848cSchristoswithin it.
292*4724848cSchristos
293*4724848cSchristosTYPE_print_ctx() prints the object B<a> on the specified BIO B<out>.
294*4724848cSchristosEach line will be prefixed with B<indent> spaces.
295*4724848cSchristosThe B<pctx> specifies the printing context and is for internal
296*4724848cSchristosuse; use NULL to get the default behavior.  If a print function is
297*4724848cSchristosuser-defined, then pass in any B<pctx> down to any nested calls.
298*4724848cSchristos
299*4724848cSchristos=head1 RETURN VALUES
300*4724848cSchristos
301*4724848cSchristosTYPE_new() and TYPE_dup() return a pointer to the object or NULL on failure.
302*4724848cSchristos
303*4724848cSchristosTYPE_print_ctx() returns 1 on success or zero on failure.
304*4724848cSchristos
305*4724848cSchristos=head1 COPYRIGHT
306*4724848cSchristos
307*4724848cSchristosCopyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
308*4724848cSchristos
309*4724848cSchristosLicensed under the OpenSSL license (the "License").  You may not use
310*4724848cSchristosthis file except in compliance with the License.  You can obtain a copy
311*4724848cSchristosin the file LICENSE in the source distribution or at
312*4724848cSchristosL<https://www.openssl.org/source/license.html>.
313*4724848cSchristos
314*4724848cSchristos=cut
315