X509_dup.pod 8.3 KB

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