PEM_read_bio_PrivateKey.pod 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  1. =pod
  2. =head1 NAME
  3. pem_password_cb,
  4. PEM_read_bio_PrivateKey, PEM_read_PrivateKey, PEM_write_bio_PrivateKey,
  5. PEM_write_bio_PrivateKey_traditional, PEM_write_PrivateKey,
  6. PEM_write_bio_PKCS8PrivateKey, PEM_write_PKCS8PrivateKey,
  7. PEM_write_bio_PKCS8PrivateKey_nid, PEM_write_PKCS8PrivateKey_nid,
  8. PEM_read_bio_PUBKEY, PEM_read_PUBKEY, PEM_write_bio_PUBKEY, PEM_write_PUBKEY,
  9. PEM_read_bio_RSAPrivateKey, PEM_read_RSAPrivateKey,
  10. PEM_write_bio_RSAPrivateKey, PEM_write_RSAPrivateKey,
  11. PEM_read_bio_RSAPublicKey, PEM_read_RSAPublicKey, PEM_write_bio_RSAPublicKey,
  12. PEM_write_RSAPublicKey, PEM_read_bio_RSA_PUBKEY, PEM_read_RSA_PUBKEY,
  13. PEM_write_bio_RSA_PUBKEY, PEM_write_RSA_PUBKEY, PEM_read_bio_DSAPrivateKey,
  14. PEM_read_DSAPrivateKey, PEM_write_bio_DSAPrivateKey, PEM_write_DSAPrivateKey,
  15. PEM_read_bio_DSA_PUBKEY, PEM_read_DSA_PUBKEY, PEM_write_bio_DSA_PUBKEY,
  16. PEM_write_DSA_PUBKEY, PEM_read_bio_DSAparams, PEM_read_DSAparams,
  17. PEM_write_bio_DSAparams, PEM_write_DSAparams, PEM_read_bio_DHparams,
  18. PEM_read_DHparams, PEM_write_bio_DHparams, PEM_write_DHparams,
  19. PEM_read_bio_X509, PEM_read_X509, PEM_write_bio_X509, PEM_write_X509,
  20. PEM_read_bio_X509_AUX, PEM_read_X509_AUX, PEM_write_bio_X509_AUX,
  21. PEM_write_X509_AUX, PEM_read_bio_X509_REQ, PEM_read_X509_REQ,
  22. PEM_write_bio_X509_REQ, PEM_write_X509_REQ, PEM_write_bio_X509_REQ_NEW,
  23. PEM_write_X509_REQ_NEW, PEM_read_bio_X509_CRL, PEM_read_X509_CRL,
  24. PEM_write_bio_X509_CRL, PEM_write_X509_CRL, PEM_read_bio_PKCS7, PEM_read_PKCS7,
  25. PEM_write_bio_PKCS7, PEM_write_PKCS7 - PEM routines
  26. =head1 SYNOPSIS
  27. #include <openssl/pem.h>
  28. typedef int pem_password_cb(char *buf, int size, int rwflag, void *u);
  29. EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x,
  30. pem_password_cb *cb, void *u);
  31. EVP_PKEY *PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x,
  32. pem_password_cb *cb, void *u);
  33. int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
  34. unsigned char *kstr, int klen,
  35. pem_password_cb *cb, void *u);
  36. int PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x,
  37. const EVP_CIPHER *enc,
  38. unsigned char *kstr, int klen,
  39. pem_password_cb *cb, void *u);
  40. int PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
  41. unsigned char *kstr, int klen,
  42. pem_password_cb *cb, void *u);
  43. int PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
  44. char *kstr, int klen,
  45. pem_password_cb *cb, void *u);
  46. int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
  47. char *kstr, int klen,
  48. pem_password_cb *cb, void *u);
  49. int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid,
  50. char *kstr, int klen,
  51. pem_password_cb *cb, void *u);
  52. int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid,
  53. char *kstr, int klen,
  54. pem_password_cb *cb, void *u);
  55. EVP_PKEY *PEM_read_bio_PUBKEY(BIO *bp, EVP_PKEY **x,
  56. pem_password_cb *cb, void *u);
  57. EVP_PKEY *PEM_read_PUBKEY(FILE *fp, EVP_PKEY **x,
  58. pem_password_cb *cb, void *u);
  59. int PEM_write_bio_PUBKEY(BIO *bp, EVP_PKEY *x);
  60. int PEM_write_PUBKEY(FILE *fp, EVP_PKEY *x);
  61. RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **x,
  62. pem_password_cb *cb, void *u);
  63. RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **x,
  64. pem_password_cb *cb, void *u);
  65. int PEM_write_bio_RSAPrivateKey(BIO *bp, RSA *x, const EVP_CIPHER *enc,
  66. unsigned char *kstr, int klen,
  67. pem_password_cb *cb, void *u);
  68. int PEM_write_RSAPrivateKey(FILE *fp, RSA *x, const EVP_CIPHER *enc,
  69. unsigned char *kstr, int klen,
  70. pem_password_cb *cb, void *u);
  71. RSA *PEM_read_bio_RSAPublicKey(BIO *bp, RSA **x,
  72. pem_password_cb *cb, void *u);
  73. RSA *PEM_read_RSAPublicKey(FILE *fp, RSA **x,
  74. pem_password_cb *cb, void *u);
  75. int PEM_write_bio_RSAPublicKey(BIO *bp, RSA *x);
  76. int PEM_write_RSAPublicKey(FILE *fp, RSA *x);
  77. RSA *PEM_read_bio_RSA_PUBKEY(BIO *bp, RSA **x,
  78. pem_password_cb *cb, void *u);
  79. RSA *PEM_read_RSA_PUBKEY(FILE *fp, RSA **x,
  80. pem_password_cb *cb, void *u);
  81. int PEM_write_bio_RSA_PUBKEY(BIO *bp, RSA *x);
  82. int PEM_write_RSA_PUBKEY(FILE *fp, RSA *x);
  83. DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **x,
  84. pem_password_cb *cb, void *u);
  85. DSA *PEM_read_DSAPrivateKey(FILE *fp, DSA **x,
  86. pem_password_cb *cb, void *u);
  87. int PEM_write_bio_DSAPrivateKey(BIO *bp, DSA *x, const EVP_CIPHER *enc,
  88. unsigned char *kstr, int klen,
  89. pem_password_cb *cb, void *u);
  90. int PEM_write_DSAPrivateKey(FILE *fp, DSA *x, const EVP_CIPHER *enc,
  91. unsigned char *kstr, int klen,
  92. pem_password_cb *cb, void *u);
  93. DSA *PEM_read_bio_DSA_PUBKEY(BIO *bp, DSA **x,
  94. pem_password_cb *cb, void *u);
  95. DSA *PEM_read_DSA_PUBKEY(FILE *fp, DSA **x,
  96. pem_password_cb *cb, void *u);
  97. int PEM_write_bio_DSA_PUBKEY(BIO *bp, DSA *x);
  98. int PEM_write_DSA_PUBKEY(FILE *fp, DSA *x);
  99. DSA *PEM_read_bio_DSAparams(BIO *bp, DSA **x, pem_password_cb *cb, void *u);
  100. DSA *PEM_read_DSAparams(FILE *fp, DSA **x, pem_password_cb *cb, void *u);
  101. int PEM_write_bio_DSAparams(BIO *bp, DSA *x);
  102. int PEM_write_DSAparams(FILE *fp, DSA *x);
  103. DH *PEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u);
  104. DH *PEM_read_DHparams(FILE *fp, DH **x, pem_password_cb *cb, void *u);
  105. int PEM_write_bio_DHparams(BIO *bp, DH *x);
  106. int PEM_write_DHparams(FILE *fp, DH *x);
  107. X509 *PEM_read_bio_X509(BIO *bp, X509 **x, pem_password_cb *cb, void *u);
  108. X509 *PEM_read_X509(FILE *fp, X509 **x, pem_password_cb *cb, void *u);
  109. int PEM_write_bio_X509(BIO *bp, X509 *x);
  110. int PEM_write_X509(FILE *fp, X509 *x);
  111. X509 *PEM_read_bio_X509_AUX(BIO *bp, X509 **x, pem_password_cb *cb, void *u);
  112. X509 *PEM_read_X509_AUX(FILE *fp, X509 **x, pem_password_cb *cb, void *u);
  113. int PEM_write_bio_X509_AUX(BIO *bp, X509 *x);
  114. int PEM_write_X509_AUX(FILE *fp, X509 *x);
  115. X509_REQ *PEM_read_bio_X509_REQ(BIO *bp, X509_REQ **x,
  116. pem_password_cb *cb, void *u);
  117. X509_REQ *PEM_read_X509_REQ(FILE *fp, X509_REQ **x,
  118. pem_password_cb *cb, void *u);
  119. int PEM_write_bio_X509_REQ(BIO *bp, X509_REQ *x);
  120. int PEM_write_X509_REQ(FILE *fp, X509_REQ *x);
  121. int PEM_write_bio_X509_REQ_NEW(BIO *bp, X509_REQ *x);
  122. int PEM_write_X509_REQ_NEW(FILE *fp, X509_REQ *x);
  123. X509_CRL *PEM_read_bio_X509_CRL(BIO *bp, X509_CRL **x,
  124. pem_password_cb *cb, void *u);
  125. X509_CRL *PEM_read_X509_CRL(FILE *fp, X509_CRL **x,
  126. pem_password_cb *cb, void *u);
  127. int PEM_write_bio_X509_CRL(BIO *bp, X509_CRL *x);
  128. int PEM_write_X509_CRL(FILE *fp, X509_CRL *x);
  129. PKCS7 *PEM_read_bio_PKCS7(BIO *bp, PKCS7 **x, pem_password_cb *cb, void *u);
  130. PKCS7 *PEM_read_PKCS7(FILE *fp, PKCS7 **x, pem_password_cb *cb, void *u);
  131. int PEM_write_bio_PKCS7(BIO *bp, PKCS7 *x);
  132. int PEM_write_PKCS7(FILE *fp, PKCS7 *x);
  133. =head1 DESCRIPTION
  134. The PEM functions read or write structures in PEM format. In
  135. this sense PEM format is simply base64 encoded data surrounded
  136. by header lines.
  137. For more details about the meaning of arguments see the
  138. B<PEM FUNCTION ARGUMENTS> section.
  139. Each operation has four functions associated with it. For
  140. clarity the term "B<foobar> functions" will be used to collectively
  141. refer to the PEM_read_bio_foobar(), PEM_read_foobar(),
  142. PEM_write_bio_foobar() and PEM_write_foobar() functions.
  143. The B<PrivateKey> functions read or write a private key in PEM format using an
  144. EVP_PKEY structure. The write routines use PKCS#8 private key format and are
  145. equivalent to PEM_write_bio_PKCS8PrivateKey().The read functions transparently
  146. handle traditional and PKCS#8 format encrypted and unencrypted keys.
  147. PEM_write_bio_PrivateKey_traditional() writes out a private key in legacy
  148. "traditional" format.
  149. PEM_write_bio_PKCS8PrivateKey() and PEM_write_PKCS8PrivateKey() write a private
  150. key in an EVP_PKEY structure in PKCS#8 EncryptedPrivateKeyInfo format using
  151. PKCS#5 v2.0 password based encryption algorithms. The B<cipher> argument
  152. specifies the encryption algorithm to use: unlike some other PEM routines the
  153. encryption is applied at the PKCS#8 level and not in the PEM headers. If
  154. B<cipher> is NULL then no encryption is used and a PKCS#8 PrivateKeyInfo
  155. structure is used instead.
  156. PEM_write_bio_PKCS8PrivateKey_nid() and PEM_write_PKCS8PrivateKey_nid()
  157. also write out a private key as a PKCS#8 EncryptedPrivateKeyInfo however
  158. it uses PKCS#5 v1.5 or PKCS#12 encryption algorithms instead. The algorithm
  159. to use is specified in the B<nid> parameter and should be the NID of the
  160. corresponding OBJECT IDENTIFIER (see NOTES section).
  161. The B<PUBKEY> functions process a public key using an EVP_PKEY
  162. structure. The public key is encoded as a SubjectPublicKeyInfo
  163. structure.
  164. The B<RSAPrivateKey> functions process an RSA private key using an
  165. RSA structure. The write routines uses traditional format. The read
  166. routines handles the same formats as the B<PrivateKey>
  167. functions but an error occurs if the private key is not RSA.
  168. The B<RSAPublicKey> functions process an RSA public key using an
  169. RSA structure. The public key is encoded using a PKCS#1 RSAPublicKey
  170. structure.
  171. The B<RSA_PUBKEY> functions also process an RSA public key using
  172. an RSA structure. However the public key is encoded using a
  173. SubjectPublicKeyInfo structure and an error occurs if the public
  174. key is not RSA.
  175. The B<DSAPrivateKey> functions process a DSA private key using a
  176. DSA structure. The write routines uses traditional format. The read
  177. routines handles the same formats as the B<PrivateKey>
  178. functions but an error occurs if the private key is not DSA.
  179. The B<DSA_PUBKEY> functions process a DSA public key using
  180. a DSA structure. The public key is encoded using a
  181. SubjectPublicKeyInfo structure and an error occurs if the public
  182. key is not DSA.
  183. The B<DSAparams> functions process DSA parameters using a DSA
  184. structure. The parameters are encoded using a Dss-Parms structure
  185. as defined in RFC2459.
  186. The B<DHparams> functions process DH parameters using a DH
  187. structure. The parameters are encoded using a PKCS#3 DHparameter
  188. structure.
  189. The B<X509> functions process an X509 certificate using an X509
  190. structure. They will also process a trusted X509 certificate but
  191. any trust settings are discarded.
  192. The B<X509_AUX> functions process a trusted X509 certificate using
  193. an X509 structure.
  194. The B<X509_REQ> and B<X509_REQ_NEW> functions process a PKCS#10
  195. certificate request using an X509_REQ structure. The B<X509_REQ>
  196. write functions use B<CERTIFICATE REQUEST> in the header whereas
  197. the B<X509_REQ_NEW> functions use B<NEW CERTIFICATE REQUEST>
  198. (as required by some CAs). The B<X509_REQ> read functions will
  199. handle either form so there are no B<X509_REQ_NEW> read functions.
  200. The B<X509_CRL> functions process an X509 CRL using an X509_CRL
  201. structure.
  202. The B<PKCS7> functions process a PKCS#7 ContentInfo using a PKCS7
  203. structure.
  204. =head1 PEM FUNCTION ARGUMENTS
  205. The PEM functions have many common arguments.
  206. The B<bp> BIO parameter (if present) specifies the BIO to read from
  207. or write to.
  208. The B<fp> FILE parameter (if present) specifies the FILE pointer to
  209. read from or write to.
  210. The PEM read functions all take an argument B<TYPE **x> and return
  211. a B<TYPE *> pointer. Where B<TYPE> is whatever structure the function
  212. uses. If B<x> is NULL then the parameter is ignored. If B<x> is not
  213. NULL but B<*x> is NULL then the structure returned will be written
  214. to B<*x>. If neither B<x> nor B<*x> is NULL then an attempt is made
  215. to reuse the structure at B<*x> (but see BUGS and EXAMPLES sections).
  216. Irrespective of the value of B<x> a pointer to the structure is always
  217. returned (or NULL if an error occurred).
  218. The PEM functions which write private keys take an B<enc> parameter
  219. which specifies the encryption algorithm to use, encryption is done
  220. at the PEM level. If this parameter is set to NULL then the private
  221. key is written in unencrypted form.
  222. The B<cb> argument is the callback to use when querying for the pass
  223. phrase used for encrypted PEM structures (normally only private keys).
  224. For the PEM write routines if the B<kstr> parameter is not NULL then
  225. B<klen> bytes at B<kstr> are used as the passphrase and B<cb> is
  226. ignored.
  227. If the B<cb> parameters is set to NULL and the B<u> parameter is not
  228. NULL then the B<u> parameter is interpreted as a null terminated string
  229. to use as the passphrase. If both B<cb> and B<u> are NULL then the
  230. default callback routine is used which will typically prompt for the
  231. passphrase on the current terminal with echoing turned off.
  232. The default passphrase callback is sometimes inappropriate (for example
  233. in a GUI application) so an alternative can be supplied. The callback
  234. routine has the following form:
  235. int cb(char *buf, int size, int rwflag, void *u);
  236. B<buf> is the buffer to write the passphrase to. B<size> is the maximum
  237. length of the passphrase (i.e. the size of buf). B<rwflag> is a flag
  238. which is set to 0 when reading and 1 when writing. A typical routine
  239. will ask the user to verify the passphrase (for example by prompting
  240. for it twice) if B<rwflag> is 1. The B<u> parameter has the same
  241. value as the B<u> parameter passed to the PEM routine. It allows
  242. arbitrary data to be passed to the callback by the application
  243. (for example a window handle in a GUI application). The callback
  244. B<must> return the number of characters in the passphrase or -1 if
  245. an error occurred.
  246. =head1 EXAMPLES
  247. Although the PEM routines take several arguments in almost all applications
  248. most of them are set to 0 or NULL.
  249. Read a certificate in PEM format from a BIO:
  250. X509 *x;
  251. x = PEM_read_bio_X509(bp, NULL, 0, NULL);
  252. if (x == NULL) {
  253. /* Error */
  254. }
  255. Alternative method:
  256. X509 *x = NULL;
  257. if (!PEM_read_bio_X509(bp, &x, 0, NULL)) {
  258. /* Error */
  259. }
  260. Write a certificate to a BIO:
  261. if (!PEM_write_bio_X509(bp, x)) {
  262. /* Error */
  263. }
  264. Write a private key (using traditional format) to a BIO using
  265. triple DES encryption, the pass phrase is prompted for:
  266. if (!PEM_write_bio_PrivateKey(bp, key, EVP_des_ede3_cbc(), NULL, 0, 0, NULL)) {
  267. /* Error */
  268. }
  269. Write a private key (using PKCS#8 format) to a BIO using triple
  270. DES encryption, using the pass phrase "hello":
  271. if (!PEM_write_bio_PKCS8PrivateKey(bp, key, EVP_des_ede3_cbc(), NULL, 0, 0, "hello")) {
  272. /* Error */
  273. }
  274. Read a private key from a BIO using a pass phrase callback:
  275. key = PEM_read_bio_PrivateKey(bp, NULL, pass_cb, "My Private Key");
  276. if (key == NULL) {
  277. /* Error */
  278. }
  279. Skeleton pass phrase callback:
  280. int pass_cb(char *buf, int size, int rwflag, void *u)
  281. {
  282. /* We'd probably do something else if 'rwflag' is 1 */
  283. printf("Enter pass phrase for \"%s\"\n", (char *)u);
  284. /* get pass phrase, length 'len' into 'tmp' */
  285. char *tmp = "hello";
  286. if (tmp == NULL) /* An error occurred */
  287. return -1;
  288. size_t len = strlen(tmp);
  289. if (len > size)
  290. len = size;
  291. memcpy(buf, tmp, len);
  292. return len;
  293. }
  294. =head1 NOTES
  295. The old B<PrivateKey> write routines are retained for compatibility.
  296. New applications should write private keys using the
  297. PEM_write_bio_PKCS8PrivateKey() or PEM_write_PKCS8PrivateKey() routines
  298. because they are more secure (they use an iteration count of 2048 whereas
  299. the traditional routines use a count of 1) unless compatibility with older
  300. versions of OpenSSL is important.
  301. The B<PrivateKey> read routines can be used in all applications because
  302. they handle all formats transparently.
  303. A frequent cause of problems is attempting to use the PEM routines like
  304. this:
  305. X509 *x;
  306. PEM_read_bio_X509(bp, &x, 0, NULL);
  307. this is a bug because an attempt will be made to reuse the data at B<x>
  308. which is an uninitialised pointer.
  309. =head1 PEM ENCRYPTION FORMAT
  310. These old B<PrivateKey> routines use a non standard technique for encryption.
  311. The private key (or other data) takes the following form:
  312. -----BEGIN RSA PRIVATE KEY-----
  313. Proc-Type: 4,ENCRYPTED
  314. DEK-Info: DES-EDE3-CBC,3F17F5316E2BAC89
  315. ...base64 encoded data...
  316. -----END RSA PRIVATE KEY-----
  317. The line beginning with I<Proc-Type> contains the version and the
  318. protection on the encapsulated data. The line beginning I<DEK-Info>
  319. contains two comma separated values: the encryption algorithm name as
  320. used by EVP_get_cipherbyname() and an initialization vector used by the
  321. cipher encoded as a set of hexadecimal digits. After those two lines is
  322. the base64-encoded encrypted data.
  323. The encryption key is derived using EVP_BytesToKey(). The cipher's
  324. initialization vector is passed to EVP_BytesToKey() as the B<salt>
  325. parameter. Internally, B<PKCS5_SALT_LEN> bytes of the salt are used
  326. (regardless of the size of the initialization vector). The user's
  327. password is passed to EVP_BytesToKey() using the B<data> and B<datal>
  328. parameters. Finally, the library uses an iteration count of 1 for
  329. EVP_BytesToKey().
  330. The B<key> derived by EVP_BytesToKey() along with the original initialization
  331. vector is then used to decrypt the encrypted data. The B<iv> produced by
  332. EVP_BytesToKey() is not utilized or needed, and NULL should be passed to
  333. the function.
  334. The pseudo code to derive the key would look similar to:
  335. EVP_CIPHER* cipher = EVP_des_ede3_cbc();
  336. EVP_MD* md = EVP_md5();
  337. unsigned int nkey = EVP_CIPHER_key_length(cipher);
  338. unsigned int niv = EVP_CIPHER_iv_length(cipher);
  339. unsigned char key[nkey];
  340. unsigned char iv[niv];
  341. memcpy(iv, HexToBin("3F17F5316E2BAC89"), niv);
  342. rc = EVP_BytesToKey(cipher, md, iv /*salt*/, pword, plen, 1, key, NULL /*iv*/);
  343. if (rc != nkey) {
  344. /* Error */
  345. }
  346. /* On success, use key and iv to initialize the cipher */
  347. =head1 BUGS
  348. The PEM read routines in some versions of OpenSSL will not correctly reuse
  349. an existing structure. Therefore the following:
  350. PEM_read_bio_X509(bp, &x, 0, NULL);
  351. where B<x> already contains a valid certificate, may not work, whereas:
  352. X509_free(x);
  353. x = PEM_read_bio_X509(bp, NULL, 0, NULL);
  354. is guaranteed to work.
  355. =head1 RETURN CODES
  356. The read routines return either a pointer to the structure read or NULL
  357. if an error occurred.
  358. The write routines return 1 for success or 0 for failure.
  359. =head1 HISTORY
  360. The old Netscape certificate sequences were no longer documented
  361. in OpenSSL 1.1; applications should use the PKCS7 standard instead
  362. as they will be formally deprecated in a future releases.
  363. =head1 SEE ALSO
  364. L<EVP_EncryptInit(3)>, L<EVP_BytesToKey(3)>
  365. =head1 COPYRIGHT
  366. Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
  367. Licensed under the OpenSSL license (the "License"). You may not use
  368. this file except in compliance with the License. You can obtain a copy
  369. in the file LICENSE in the source distribution or at
  370. L<https://www.openssl.org/source/license.html>.
  371. =cut