Add documentation of OSSL_CRMF_CERTID_dup()
[openssl.git] / doc / man3 / X509_dup.pod
1 =pod
2
3 =head1 NAME
4
5 DECLARE_ASN1_FUNCTIONS,
6 IMPLEMENT_ASN1_FUNCTIONS,
7 ASN1_ITEM,
8 ACCESS_DESCRIPTION_free,
9 ACCESS_DESCRIPTION_new,
10 ADMISSIONS_free,
11 ADMISSIONS_new,
12 ADMISSION_SYNTAX_free,
13 ADMISSION_SYNTAX_new,
14 ASIdOrRange_free,
15 ASIdOrRange_new,
16 ASIdentifierChoice_free,
17 ASIdentifierChoice_new,
18 ASIdentifiers_free,
19 ASIdentifiers_new,
20 ASRange_free,
21 ASRange_new,
22 AUTHORITY_INFO_ACCESS_free,
23 AUTHORITY_INFO_ACCESS_new,
24 AUTHORITY_KEYID_free,
25 AUTHORITY_KEYID_new,
26 BASIC_CONSTRAINTS_free,
27 BASIC_CONSTRAINTS_new,
28 CERTIFICATEPOLICIES_free,
29 CERTIFICATEPOLICIES_new,
30 CMS_ContentInfo_free,
31 CMS_ContentInfo_new,
32 CMS_ContentInfo_print_ctx,
33 CMS_ReceiptRequest_free,
34 CMS_ReceiptRequest_new,
35 CRL_DIST_POINTS_free,
36 CRL_DIST_POINTS_new,
37 DIRECTORYSTRING_free,
38 DIRECTORYSTRING_new,
39 DISPLAYTEXT_free,
40 DISPLAYTEXT_new,
41 DIST_POINT_NAME_free,
42 DIST_POINT_NAME_new,
43 DIST_POINT_free,
44 DIST_POINT_new,
45 DSAparams_dup,
46 ECPARAMETERS_free,
47 ECPARAMETERS_new,
48 ECPKPARAMETERS_free,
49 ECPKPARAMETERS_new,
50 EDIPARTYNAME_free,
51 EDIPARTYNAME_new,
52 ESS_CERT_ID_dup,
53 ESS_CERT_ID_free,
54 ESS_CERT_ID_new,
55 ESS_CERT_ID_V2_dup,
56 ESS_CERT_ID_V2_free,
57 ESS_CERT_ID_V2_new,
58 ESS_ISSUER_SERIAL_dup,
59 ESS_ISSUER_SERIAL_free,
60 ESS_ISSUER_SERIAL_new,
61 ESS_SIGNING_CERT_dup,
62 ESS_SIGNING_CERT_free,
63 ESS_SIGNING_CERT_new,
64 ESS_SIGNING_CERT_V2_dup,
65 ESS_SIGNING_CERT_V2_free,
66 ESS_SIGNING_CERT_V2_new,
67 EXTENDED_KEY_USAGE_free,
68 EXTENDED_KEY_USAGE_new,
69 GENERAL_NAMES_free,
70 GENERAL_NAMES_new,
71 GENERAL_NAME_dup,
72 GENERAL_NAME_free,
73 GENERAL_NAME_new,
74 GENERAL_SUBTREE_free,
75 GENERAL_SUBTREE_new,
76 IPAddressChoice_free,
77 IPAddressChoice_new,
78 IPAddressFamily_free,
79 IPAddressFamily_new,
80 IPAddressOrRange_free,
81 IPAddressOrRange_new,
82 IPAddressRange_free,
83 IPAddressRange_new,
84 ISSUER_SIGN_TOOL_free,
85 ISSUER_SIGN_TOOL_it,
86 ISSUER_SIGN_TOOL_new,
87 ISSUING_DIST_POINT_free,
88 ISSUING_DIST_POINT_it,
89 ISSUING_DIST_POINT_new,
90 NAME_CONSTRAINTS_free,
91 NAME_CONSTRAINTS_new,
92 NAMING_AUTHORITY_free,
93 NAMING_AUTHORITY_new,
94 NETSCAPE_CERT_SEQUENCE_free,
95 NETSCAPE_CERT_SEQUENCE_new,
96 NETSCAPE_SPKAC_free,
97 NETSCAPE_SPKAC_new,
98 NETSCAPE_SPKI_free,
99 NETSCAPE_SPKI_new,
100 NOTICEREF_free,
101 NOTICEREF_new,
102 OCSP_BASICRESP_free,
103 OCSP_BASICRESP_new,
104 OCSP_CERTID_dup,
105 OCSP_CERTID_new,
106 OCSP_CERTSTATUS_free,
107 OCSP_CERTSTATUS_new,
108 OCSP_CRLID_free,
109 OCSP_CRLID_new,
110 OCSP_ONEREQ_free,
111 OCSP_ONEREQ_new,
112 OCSP_REQINFO_free,
113 OCSP_REQINFO_new,
114 OCSP_RESPBYTES_free,
115 OCSP_RESPBYTES_new,
116 OCSP_RESPDATA_free,
117 OCSP_RESPDATA_new,
118 OCSP_RESPID_free,
119 OCSP_RESPID_new,
120 OCSP_RESPONSE_new,
121 OCSP_REVOKEDINFO_free,
122 OCSP_REVOKEDINFO_new,
123 OCSP_SERVICELOC_free,
124 OCSP_SERVICELOC_new,
125 OCSP_SIGNATURE_free,
126 OCSP_SIGNATURE_new,
127 OCSP_SINGLERESP_free,
128 OCSP_SINGLERESP_new,
129 OSSL_CMP_ITAV_dup,
130 OSSL_CMP_ITAV_free,
131 OSSL_CMP_MSG_dup,
132 OSSL_CMP_MSG_it,
133 OSSL_CMP_MSG_free,
134 OSSL_CMP_PKIHEADER_free,
135 OSSL_CMP_PKIHEADER_it,
136 OSSL_CMP_PKIHEADER_new,
137 OSSL_CMP_PKISI_dup,
138 OSSL_CMP_PKISI_free,
139 OSSL_CMP_PKISI_it,
140 OSSL_CMP_PKISI_new,
141 OSSL_CMP_PKISTATUS_it,
142 OSSL_CRMF_CERTID_dup,
143 OSSL_CRMF_CERTID_free,
144 OSSL_CRMF_CERTID_it,
145 OSSL_CRMF_CERTID_new,
146 OSSL_CRMF_CERTTEMPLATE_free,
147 OSSL_CRMF_CERTTEMPLATE_it,
148 OSSL_CRMF_CERTTEMPLATE_new,
149 OSSL_CRMF_ENCRYPTEDVALUE_free,
150 OSSL_CRMF_ENCRYPTEDVALUE_it,
151 OSSL_CRMF_ENCRYPTEDVALUE_new,
152 OSSL_CRMF_MSGS_free,
153 OSSL_CRMF_MSGS_it,
154 OSSL_CRMF_MSGS_new,
155 OSSL_CRMF_MSG_free,
156 OSSL_CRMF_MSG_it,
157 OSSL_CRMF_MSG_new,
158 OSSL_CRMF_PBMPARAMETER_free,
159 OSSL_CRMF_PBMPARAMETER_it,
160 OSSL_CRMF_PBMPARAMETER_new,
161 OSSL_CRMF_PKIPUBLICATIONINFO_free,
162 OSSL_CRMF_PKIPUBLICATIONINFO_it,
163 OSSL_CRMF_PKIPUBLICATIONINFO_new,
164 OSSL_CRMF_SINGLEPUBINFO_free,
165 OSSL_CRMF_SINGLEPUBINFO_it,
166 OSSL_CRMF_SINGLEPUBINFO_new,
167 OTHERNAME_free,
168 OTHERNAME_new,
169 PBE2PARAM_free,
170 PBE2PARAM_new,
171 PBEPARAM_free,
172 PBEPARAM_new,
173 PBKDF2PARAM_free,
174 PBKDF2PARAM_new,
175 PKCS12_BAGS_free,
176 PKCS12_BAGS_new,
177 PKCS12_MAC_DATA_free,
178 PKCS12_MAC_DATA_new,
179 PKCS12_SAFEBAG_free,
180 PKCS12_SAFEBAG_new,
181 PKCS12_free,
182 PKCS12_new,
183 PKCS7_DIGEST_free,
184 PKCS7_DIGEST_new,
185 PKCS7_ENCRYPT_free,
186 PKCS7_ENCRYPT_new,
187 PKCS7_ENC_CONTENT_free,
188 PKCS7_ENC_CONTENT_new,
189 PKCS7_ENVELOPE_free,
190 PKCS7_ENVELOPE_new,
191 PKCS7_ISSUER_AND_SERIAL_free,
192 PKCS7_ISSUER_AND_SERIAL_new,
193 PKCS7_RECIP_INFO_free,
194 PKCS7_RECIP_INFO_new,
195 PKCS7_SIGNED_free,
196 PKCS7_SIGNED_new,
197 PKCS7_SIGNER_INFO_free,
198 PKCS7_SIGNER_INFO_new,
199 PKCS7_SIGN_ENVELOPE_free,
200 PKCS7_SIGN_ENVELOPE_new,
201 PKCS7_dup,
202 PKCS7_free,
203 PKCS7_new,
204 PKCS7_print_ctx,
205 PKCS8_PRIV_KEY_INFO_free,
206 PKCS8_PRIV_KEY_INFO_new,
207 PKEY_USAGE_PERIOD_free,
208 PKEY_USAGE_PERIOD_new,
209 POLICYINFO_free,
210 POLICYINFO_new,
211 POLICYQUALINFO_free,
212 POLICYQUALINFO_new,
213 POLICY_CONSTRAINTS_free,
214 POLICY_CONSTRAINTS_new,
215 POLICY_MAPPING_free,
216 POLICY_MAPPING_new,
217 PROFESSION_INFOS_free,
218 PROFESSION_INFOS_new,
219 PROFESSION_INFO_free,
220 PROFESSION_INFO_new,
221 PROXY_CERT_INFO_EXTENSION_free,
222 PROXY_CERT_INFO_EXTENSION_new,
223 PROXY_POLICY_free,
224 PROXY_POLICY_new,
225 RSAPrivateKey_dup,
226 RSAPublicKey_dup,
227 RSA_OAEP_PARAMS_free,
228 RSA_OAEP_PARAMS_new,
229 RSA_PSS_PARAMS_free,
230 RSA_PSS_PARAMS_new,
231 SCRYPT_PARAMS_free,
232 SCRYPT_PARAMS_new,
233 SXNETID_free,
234 SXNETID_new,
235 SXNET_free,
236 SXNET_new,
237 TLS_FEATURE_free,
238 TLS_FEATURE_new,
239 TS_ACCURACY_dup,
240 TS_ACCURACY_free,
241 TS_ACCURACY_new,
242 TS_MSG_IMPRINT_dup,
243 TS_MSG_IMPRINT_free,
244 TS_MSG_IMPRINT_new,
245 TS_REQ_dup,
246 TS_REQ_free,
247 TS_REQ_new,
248 TS_RESP_dup,
249 TS_RESP_free,
250 TS_RESP_new,
251 TS_STATUS_INFO_dup,
252 TS_STATUS_INFO_free,
253 TS_STATUS_INFO_new,
254 TS_TST_INFO_dup,
255 TS_TST_INFO_free,
256 TS_TST_INFO_new,
257 USERNOTICE_free,
258 USERNOTICE_new,
259 X509_ALGOR_free,
260 X509_ALGOR_it,
261 X509_ALGOR_new,
262 X509_ATTRIBUTE_dup,
263 X509_ATTRIBUTE_free,
264 X509_ATTRIBUTE_new,
265 X509_CERT_AUX_free,
266 X509_CERT_AUX_new,
267 X509_CINF_free,
268 X509_CINF_new,
269 X509_CRL_INFO_free,
270 X509_CRL_INFO_new,
271 X509_CRL_dup,
272 X509_CRL_free,
273 X509_CRL_new,
274 X509_EXTENSION_dup,
275 X509_EXTENSION_free,
276 X509_EXTENSION_new,
277 X509_NAME_ENTRY_dup,
278 X509_NAME_ENTRY_free,
279 X509_NAME_ENTRY_new,
280 X509_NAME_dup,
281 X509_NAME_free,
282 X509_NAME_new,
283 X509_REQ_INFO_free,
284 X509_REQ_INFO_new,
285 X509_REQ_dup,
286 X509_REQ_free,
287 X509_REQ_new,
288 X509_REVOKED_dup,
289 X509_REVOKED_free,
290 X509_REVOKED_new,
291 X509_SIG_free,
292 X509_SIG_new,
293 X509_VAL_free,
294 X509_VAL_new,
295 X509_dup,
296 - ASN1 object utilities
297
298 =head1 SYNOPSIS
299
300 =for openssl generic
301
302  #include <openssl/asn1t.h>
303
304  DECLARE_ASN1_FUNCTIONS(type)
305  IMPLEMENT_ASN1_FUNCTIONS(stname)
306
307  typedef struct ASN1_ITEM_st ASN1_ITEM;
308
309  extern const ASN1_ITEM TYPE_it;
310  TYPE *TYPE_new(void);
311  TYPE *TYPE_dup(const TYPE *a);
312  void TYPE_free(TYPE *a);
313  int TYPE_print_ctx(BIO *out, TYPE *a, int indent, const ASN1_PCTX *pctx);
314
315 =head1 DESCRIPTION
316
317 In the description below, B<I<TYPE>> is used
318 as a placeholder for any of the OpenSSL datatypes, such as B<X509>.
319
320 The OpenSSL ASN1 parsing library templates are like a data-driven bytecode
321 interpreter.
322 Every ASN1 object as a global variable, TYPE_it, that describes the item
323 such as its fields.  (On systems which cannot export variables from shared
324 libraries, the global is instead a function which returns a pointer to a
325 static variable.
326
327 The macro DECLARE_ASN1_FUNCTIONS() is typically used in header files
328 to generate the function declarations.
329
330 The macro IMPLEMENT_ASN1_FUNCTIONS() is used once in a source file
331 to generate the function bodies.
332
333
334 B<I<TYPE>_new>() allocates an empty object of the indicated type.
335 The object returned must be released by calling B<I<TYPE>_free>().
336
337 B<I<TYPE>_dup>() copies an existing object, leaving it untouched.
338
339 B<I<TYPE>_free>() releases the object and all pointers and sub-objects
340 within it.
341
342 B<I<TYPE>_print_ctx>() prints the object I<a> on the specified BIO I<out>.
343 Each line will be prefixed with I<indent> spaces.
344 The I<pctx> specifies the printing context and is for internal
345 use; use NULL to get the default behavior.  If a print function is
346 user-defined, then pass in any I<pctx> down to any nested calls.
347
348 =head1 RETURN VALUES
349
350 B<I<TYPE>_new>() and B<I<TYPE>_dup>() return a pointer to the object or NULL on
351 failure.
352
353 B<I<TYPE>_print_ctx>() returns 1 on success or zero on failure.
354
355 =head1 COPYRIGHT
356
357 Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
358
359 Licensed under the Apache License 2.0 (the "License").  You may not use
360 this file except in compliance with the License.  You can obtain a copy
361 in the file LICENSE in the source distribution or at
362 L<https://www.openssl.org/source/license.html>.
363
364 =cut