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