6 PEM_read_bio_PrivateKey_ex, PEM_read_bio_PrivateKey, PEM_read_PrivateKey_ex,
7 PEM_read_PrivateKey, PEM_write_bio_PrivateKey,
8 PEM_write_bio_PrivateKey_traditional, PEM_write_PrivateKey,
9 PEM_write_bio_PKCS8PrivateKey, PEM_write_PKCS8PrivateKey,
10 PEM_write_bio_PKCS8PrivateKey_nid, PEM_write_PKCS8PrivateKey_nid,
11 PEM_read_bio_PUBKEY_ex, PEM_read_bio_PUBKEY, PEM_read_PUBKEY_ex,
12 PEM_read_PUBKEY, PEM_write_bio_PUBKEY, PEM_write_PUBKEY,
13 PEM_read_bio_RSAPrivateKey, PEM_read_RSAPrivateKey,
14 PEM_write_bio_RSAPrivateKey, PEM_write_RSAPrivateKey,
15 PEM_read_bio_RSAPublicKey, PEM_read_RSAPublicKey, PEM_write_bio_RSAPublicKey,
16 PEM_write_RSAPublicKey, PEM_read_bio_RSA_PUBKEY, PEM_read_RSA_PUBKEY,
17 PEM_write_bio_RSA_PUBKEY, PEM_write_RSA_PUBKEY, PEM_read_bio_DSAPrivateKey,
18 PEM_read_DSAPrivateKey, PEM_write_bio_DSAPrivateKey, PEM_write_DSAPrivateKey,
19 PEM_read_bio_DSA_PUBKEY, PEM_read_DSA_PUBKEY, PEM_write_bio_DSA_PUBKEY,
20 PEM_write_DSA_PUBKEY, PEM_read_bio_Parameters_ex, PEM_read_bio_Parameters,
21 PEM_write_bio_Parameters, PEM_read_bio_DSAparams, PEM_read_DSAparams,
22 PEM_write_bio_DSAparams, PEM_write_DSAparams, PEM_read_bio_DHparams,
23 PEM_read_DHparams, PEM_write_bio_DHparams, PEM_write_DHparams,
24 PEM_read_bio_X509, PEM_read_X509, PEM_write_bio_X509, PEM_write_X509,
25 PEM_read_bio_X509_AUX, PEM_read_X509_AUX, PEM_write_bio_X509_AUX,
26 PEM_write_X509_AUX, PEM_read_bio_X509_REQ, PEM_read_X509_REQ,
27 PEM_write_bio_X509_REQ, PEM_write_X509_REQ, PEM_write_bio_X509_REQ_NEW,
28 PEM_write_X509_REQ_NEW, PEM_read_bio_X509_CRL, PEM_read_X509_CRL,
29 PEM_write_bio_X509_CRL, PEM_write_X509_CRL, PEM_read_bio_PKCS7, PEM_read_PKCS7,
30 PEM_write_bio_PKCS7, PEM_write_PKCS7 - PEM routines
34 #include <openssl/pem.h>
36 typedef int pem_password_cb(char *buf, int size, int rwflag, void *u);
38 EVP_PKEY *PEM_read_bio_PrivateKey_ex(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
39 void *u, OPENSSL_CTX *libctx,
41 EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x,
42 pem_password_cb *cb, void *u);
43 EVP_PKEY *PEM_read_PrivateKey_ex(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,
44 void *u, OPENSSL_CTX *libctx,
46 EVP_PKEY *PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x,
47 pem_password_cb *cb, void *u);
48 int PEM_write_bio_PrivateKey(BIO *bp, const EVP_PKEY *x, const EVP_CIPHER *enc,
49 unsigned char *kstr, int klen,
50 pem_password_cb *cb, void *u);
51 int PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x,
52 const EVP_CIPHER *enc,
53 unsigned char *kstr, int klen,
54 pem_password_cb *cb, void *u);
55 int PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
56 unsigned char *kstr, int klen,
57 pem_password_cb *cb, void *u);
58 int PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
60 pem_password_cb *cb, void *u);
61 int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
63 pem_password_cb *cb, void *u);
64 int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, const EVP_PKEY *x, int nid,
66 pem_password_cb *cb, void *u);
67 int PEM_write_PKCS8PrivateKey_nid(FILE *fp, const EVP_PKEY *x, int nid,
69 pem_password_cb *cb, void *u);
71 EVP_PKEY *PEM_read_bio_PUBKEY_ex(BIO *bp, EVP_PKEY **x,
72 pem_password_cb *cb, void *u,
73 OPENSSL_CTX *libctx, const char *propq);
74 EVP_PKEY *PEM_read_bio_PUBKEY(BIO *bp, EVP_PKEY **x,
75 pem_password_cb *cb, void *u);
76 EVP_PKEY *PEM_read_PUBKEY_ex(FILE *fp, EVP_PKEY **x,
77 pem_password_cb *cb, void *u,
78 OPENSSL_CTX *libctx, const char *propq);
79 EVP_PKEY *PEM_read_PUBKEY(FILE *fp, EVP_PKEY **x,
80 pem_password_cb *cb, void *u);
81 int PEM_write_bio_PUBKEY(BIO *bp, EVP_PKEY *x);
82 int PEM_write_PUBKEY(FILE *fp, EVP_PKEY *x);
84 RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **x,
85 pem_password_cb *cb, void *u);
86 RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **x,
87 pem_password_cb *cb, void *u);
88 int PEM_write_bio_RSAPrivateKey(BIO *bp, RSA *x, const EVP_CIPHER *enc,
89 unsigned char *kstr, int klen,
90 pem_password_cb *cb, void *u);
91 int PEM_write_RSAPrivateKey(FILE *fp, RSA *x, const EVP_CIPHER *enc,
92 unsigned char *kstr, int klen,
93 pem_password_cb *cb, void *u);
95 RSA *PEM_read_bio_RSAPublicKey(BIO *bp, RSA **x,
96 pem_password_cb *cb, void *u);
97 RSA *PEM_read_RSAPublicKey(FILE *fp, RSA **x,
98 pem_password_cb *cb, void *u);
99 int PEM_write_bio_RSAPublicKey(BIO *bp, RSA *x);
100 int PEM_write_RSAPublicKey(FILE *fp, RSA *x);
102 RSA *PEM_read_bio_RSA_PUBKEY(BIO *bp, RSA **x,
103 pem_password_cb *cb, void *u);
104 RSA *PEM_read_RSA_PUBKEY(FILE *fp, RSA **x,
105 pem_password_cb *cb, void *u);
106 int PEM_write_bio_RSA_PUBKEY(BIO *bp, RSA *x);
107 int PEM_write_RSA_PUBKEY(FILE *fp, RSA *x);
109 DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **x,
110 pem_password_cb *cb, void *u);
111 DSA *PEM_read_DSAPrivateKey(FILE *fp, DSA **x,
112 pem_password_cb *cb, void *u);
113 int PEM_write_bio_DSAPrivateKey(BIO *bp, DSA *x, const EVP_CIPHER *enc,
114 unsigned char *kstr, int klen,
115 pem_password_cb *cb, void *u);
116 int PEM_write_DSAPrivateKey(FILE *fp, DSA *x, const EVP_CIPHER *enc,
117 unsigned char *kstr, int klen,
118 pem_password_cb *cb, void *u);
120 DSA *PEM_read_bio_DSA_PUBKEY(BIO *bp, DSA **x,
121 pem_password_cb *cb, void *u);
122 DSA *PEM_read_DSA_PUBKEY(FILE *fp, DSA **x,
123 pem_password_cb *cb, void *u);
124 int PEM_write_bio_DSA_PUBKEY(BIO *bp, DSA *x);
125 int PEM_write_DSA_PUBKEY(FILE *fp, DSA *x);
127 EVP_PKEY *PEM_read_bio_Parameters_ex(BIO *bp, EVP_PKEY **x,
128 OPENSSL_CTX *libctx, const char *propq);
129 EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x);
130 int PEM_write_bio_Parameters(BIO *bp, const EVP_PKEY *x);
132 DSA *PEM_read_bio_DSAparams(BIO *bp, DSA **x, pem_password_cb *cb, void *u);
133 DSA *PEM_read_DSAparams(FILE *fp, DSA **x, pem_password_cb *cb, void *u);
134 int PEM_write_bio_DSAparams(BIO *bp, DSA *x);
135 int PEM_write_DSAparams(FILE *fp, DSA *x);
137 DH *PEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u);
138 DH *PEM_read_DHparams(FILE *fp, DH **x, pem_password_cb *cb, void *u);
139 int PEM_write_bio_DHparams(BIO *bp, DH *x);
140 int PEM_write_DHparams(FILE *fp, DH *x);
142 X509 *PEM_read_bio_X509(BIO *bp, X509 **x, pem_password_cb *cb, void *u);
143 X509 *PEM_read_X509(FILE *fp, X509 **x, pem_password_cb *cb, void *u);
144 int PEM_write_bio_X509(BIO *bp, X509 *x);
145 int PEM_write_X509(FILE *fp, X509 *x);
147 X509 *PEM_read_bio_X509_AUX(BIO *bp, X509 **x, pem_password_cb *cb, void *u);
148 X509 *PEM_read_X509_AUX(FILE *fp, X509 **x, pem_password_cb *cb, void *u);
149 int PEM_write_bio_X509_AUX(BIO *bp, X509 *x);
150 int PEM_write_X509_AUX(FILE *fp, X509 *x);
152 X509_REQ *PEM_read_bio_X509_REQ(BIO *bp, X509_REQ **x,
153 pem_password_cb *cb, void *u);
154 X509_REQ *PEM_read_X509_REQ(FILE *fp, X509_REQ **x,
155 pem_password_cb *cb, void *u);
156 int PEM_write_bio_X509_REQ(BIO *bp, X509_REQ *x);
157 int PEM_write_X509_REQ(FILE *fp, X509_REQ *x);
158 int PEM_write_bio_X509_REQ_NEW(BIO *bp, X509_REQ *x);
159 int PEM_write_X509_REQ_NEW(FILE *fp, X509_REQ *x);
161 X509_CRL *PEM_read_bio_X509_CRL(BIO *bp, X509_CRL **x,
162 pem_password_cb *cb, void *u);
163 X509_CRL *PEM_read_X509_CRL(FILE *fp, X509_CRL **x,
164 pem_password_cb *cb, void *u);
165 int PEM_write_bio_X509_CRL(BIO *bp, X509_CRL *x);
166 int PEM_write_X509_CRL(FILE *fp, X509_CRL *x);
168 PKCS7 *PEM_read_bio_PKCS7(BIO *bp, PKCS7 **x, pem_password_cb *cb, void *u);
169 PKCS7 *PEM_read_PKCS7(FILE *fp, PKCS7 **x, pem_password_cb *cb, void *u);
170 int PEM_write_bio_PKCS7(BIO *bp, PKCS7 *x);
171 int PEM_write_PKCS7(FILE *fp, PKCS7 *x);
175 The PEM functions read or write structures in PEM format. In
176 this sense PEM format is simply base64 encoded data surrounded
179 For more details about the meaning of arguments see the
180 B<PEM FUNCTION ARGUMENTS> section.
182 Each operation has four functions associated with it. For
183 brevity the term "B<I<TYPE>> functions" will be used below to collectively
184 refer to the B<PEM_read_bio_I<TYPE>>(), B<PEM_read_I<TYPE>>(),
185 B<PEM_write_bio_I<TYPE>>(), and B<PEM_write_I<TYPE>>() functions.
187 Some operations have additional variants that take a library context I<libctx>
188 and a property query string I<propq>.
190 The B<PrivateKey> functions read or write a private key in PEM format using an
191 EVP_PKEY structure. The write routines use PKCS#8 private key format and are
192 equivalent to PEM_write_bio_PKCS8PrivateKey().The read functions transparently
193 handle traditional and PKCS#8 format encrypted and unencrypted keys.
195 PEM_write_bio_PrivateKey_traditional() writes out a private key in the
196 "traditional" format with a simple private key marker and should only
197 be used for compatibility with legacy programs.
199 PEM_write_bio_PKCS8PrivateKey() and PEM_write_PKCS8PrivateKey() write a private
200 key in an EVP_PKEY structure in PKCS#8 EncryptedPrivateKeyInfo format using
201 PKCS#5 v2.0 password based encryption algorithms. The I<cipher> argument
202 specifies the encryption algorithm to use: unlike some other PEM routines the
203 encryption is applied at the PKCS#8 level and not in the PEM headers. If
204 I<cipher> is NULL then no encryption is used and a PKCS#8 PrivateKeyInfo
205 structure is used instead.
207 PEM_write_bio_PKCS8PrivateKey_nid() and PEM_write_PKCS8PrivateKey_nid()
208 also write out a private key as a PKCS#8 EncryptedPrivateKeyInfo however
209 it uses PKCS#5 v1.5 or PKCS#12 encryption algorithms instead. The algorithm
210 to use is specified in the I<nid> parameter and should be the NID of the
211 corresponding OBJECT IDENTIFIER (see NOTES section).
213 The B<PUBKEY> functions process a public key using an EVP_PKEY
214 structure. The public key is encoded as a SubjectPublicKeyInfo
217 The B<RSAPrivateKey> functions process an RSA private key using an
218 RSA structure. The write routines uses traditional format. The read
219 routines handles the same formats as the B<PrivateKey>
220 functions but an error occurs if the private key is not RSA.
222 The B<RSAPublicKey> functions process an RSA public key using an
223 RSA structure. The public key is encoded using a PKCS#1 RSAPublicKey
226 The B<RSA_PUBKEY> functions also process an RSA public key using
227 an RSA structure. However, the public key is encoded using a
228 SubjectPublicKeyInfo structure and an error occurs if the public
231 The B<DSAPrivateKey> functions process a DSA private key using a
232 DSA structure. The write routines uses traditional format. The read
233 routines handles the same formats as the B<PrivateKey>
234 functions but an error occurs if the private key is not DSA.
236 The B<DSA_PUBKEY> functions process a DSA public key using
237 a DSA structure. The public key is encoded using a
238 SubjectPublicKeyInfo structure and an error occurs if the public
241 The B<Parameters> functions read or write key parameters in PEM format using
242 an EVP_PKEY structure. The encoding depends on the type of key; for DSA key
243 parameters, it will be a Dss-Parms structure as defined in RFC2459, and for DH
244 key parameters, it will be a PKCS#3 DHparameter structure. I<These functions
245 only exist for the B<BIO> type>.
247 The B<DSAparams> functions process DSA parameters using a DSA
248 structure. The parameters are encoded using a Dss-Parms structure
249 as defined in RFC2459.
251 The B<DHparams> functions process DH parameters using a DH
252 structure. The parameters are encoded using a PKCS#3 DHparameter
255 The B<X509> functions process an X509 certificate using an X509
256 structure. They will also process a trusted X509 certificate but
257 any trust settings are discarded.
259 The B<X509_AUX> functions process a trusted X509 certificate using
262 The B<X509_REQ> and B<X509_REQ_NEW> functions process a PKCS#10
263 certificate request using an X509_REQ structure. The B<X509_REQ>
264 write functions use B<CERTIFICATE REQUEST> in the header whereas
265 the B<X509_REQ_NEW> functions use B<NEW CERTIFICATE REQUEST>
266 (as required by some CAs). The B<X509_REQ> read functions will
267 handle either form so there are no B<X509_REQ_NEW> read functions.
269 The B<X509_CRL> functions process an X509 CRL using an X509_CRL
272 The B<PKCS7> functions process a PKCS#7 ContentInfo using a PKCS7
275 =head1 PEM FUNCTION ARGUMENTS
277 The PEM functions have many common arguments.
279 The I<bp> BIO parameter (if present) specifies the BIO to read from
282 The I<fp> FILE parameter (if present) specifies the FILE pointer to
283 read from or write to.
285 The PEM read functions all take an argument I<B<TYPE> **x> and return
286 a I<B<TYPE> *> pointer. Where I<B<TYPE>> is whatever structure the function
287 uses. If I<x> is NULL then the parameter is ignored. If I<x> is not
288 NULL but I<*x> is NULL then the structure returned will be written
289 to I<*x>. If neither I<x> nor I<*x> is NULL then an attempt is made
290 to reuse the structure at I<*x> (but see BUGS and EXAMPLES sections).
291 Irrespective of the value of I<x> a pointer to the structure is always
292 returned (or NULL if an error occurred).
294 The PEM functions which write private keys take an I<enc> parameter
295 which specifies the encryption algorithm to use, encryption is done
296 at the PEM level. If this parameter is set to NULL then the private
297 key is written in unencrypted form.
299 The I<cb> argument is the callback to use when querying for the pass
300 phrase used for encrypted PEM structures (normally only private keys).
302 For the PEM write routines if the I<kstr> parameter is not NULL then
303 I<klen> bytes at I<kstr> are used as the passphrase and I<cb> is
306 If the I<cb> parameters is set to NULL and the I<u> parameter is not
307 NULL then the I<u> parameter is interpreted as a null terminated string
308 to use as the passphrase. If both I<cb> and I<u> are NULL then the
309 default callback routine is used which will typically prompt for the
310 passphrase on the current terminal with echoing turned off.
312 The default passphrase callback is sometimes inappropriate (for example
313 in a GUI application) so an alternative can be supplied. The callback
314 routine has the following form:
316 int cb(char *buf, int size, int rwflag, void *u);
318 I<buf> is the buffer to write the passphrase to. I<size> is the maximum
319 length of the passphrase (i.e. the size of buf). I<rwflag> is a flag
320 which is set to 0 when reading and 1 when writing. A typical routine
321 will ask the user to verify the passphrase (for example by prompting
322 for it twice) if I<rwflag> is 1. The I<u> parameter has the same
323 value as the I<u> parameter passed to the PEM routine. It allows
324 arbitrary data to be passed to the callback by the application
325 (for example a window handle in a GUI application). The callback
326 I<must> return the number of characters in the passphrase or -1 if
329 Some implementations may need to use cryptographic algorithms during their
330 operation. If this is the case and I<libctx> and I<propq> parameters have been
331 passed then any algorithm fetches will use that library context and property
332 query string. Otherwise the default library context and property query string
337 The old B<PrivateKey> write routines are retained for compatibility.
338 New applications should write private keys using the
339 PEM_write_bio_PKCS8PrivateKey() or PEM_write_PKCS8PrivateKey() routines
340 because they are more secure (they use an iteration count of 2048 whereas
341 the traditional routines use a count of 1) unless compatibility with older
342 versions of OpenSSL is important.
344 The B<PrivateKey> read routines can be used in all applications because
345 they handle all formats transparently.
347 A frequent cause of problems is attempting to use the PEM routines like
352 PEM_read_bio_X509(bp, &x, 0, NULL);
354 this is a bug because an attempt will be made to reuse the data at I<x>
355 which is an uninitialised pointer.
357 These functions make no assumption regarding the pass phrase received from the
359 It will simply be treated as a byte sequence.
361 =head1 PEM ENCRYPTION FORMAT
363 These old B<PrivateKey> routines use a non standard technique for encryption.
365 The private key (or other data) takes the following form:
367 -----BEGIN RSA PRIVATE KEY-----
368 Proc-Type: 4,ENCRYPTED
369 DEK-Info: DES-EDE3-CBC,3F17F5316E2BAC89
371 ...base64 encoded data...
372 -----END RSA PRIVATE KEY-----
374 The line beginning with I<Proc-Type> contains the version and the
375 protection on the encapsulated data. The line beginning I<DEK-Info>
376 contains two comma separated values: the encryption algorithm name as
377 used by EVP_get_cipherbyname() and an initialization vector used by the
378 cipher encoded as a set of hexadecimal digits. After those two lines is
379 the base64-encoded encrypted data.
381 The encryption key is derived using EVP_BytesToKey(). The cipher's
382 initialization vector is passed to EVP_BytesToKey() as the I<salt>
383 parameter. Internally, B<PKCS5_SALT_LEN> bytes of the salt are used
384 (regardless of the size of the initialization vector). The user's
385 password is passed to EVP_BytesToKey() using the I<data> and I<datal>
386 parameters. Finally, the library uses an iteration count of 1 for
389 The I<key> derived by EVP_BytesToKey() along with the original initialization
390 vector is then used to decrypt the encrypted data. The I<iv> produced by
391 EVP_BytesToKey() is not utilized or needed, and NULL should be passed to
394 The pseudo code to derive the key would look similar to:
396 EVP_CIPHER* cipher = EVP_des_ede3_cbc();
397 EVP_MD* md = EVP_md5();
399 unsigned int nkey = EVP_CIPHER_key_length(cipher);
400 unsigned int niv = EVP_CIPHER_iv_length(cipher);
401 unsigned char key[nkey];
402 unsigned char iv[niv];
404 memcpy(iv, HexToBin("3F17F5316E2BAC89"), niv);
405 rc = EVP_BytesToKey(cipher, md, iv /*salt*/, pword, plen, 1, key, NULL /*iv*/);
409 /* On success, use key and iv to initialize the cipher */
413 The PEM read routines in some versions of OpenSSL will not correctly reuse
414 an existing structure. Therefore, the following:
416 PEM_read_bio_X509(bp, &x, 0, NULL);
418 where I<x> already contains a valid certificate, may not work, whereas:
421 x = PEM_read_bio_X509(bp, NULL, 0, NULL);
423 is guaranteed to work.
427 The read routines return either a pointer to the structure read or NULL
428 if an error occurred.
430 The write routines return 1 for success or 0 for failure.
434 Although the PEM routines take several arguments in almost all applications
435 most of them are set to 0 or NULL.
437 To read a certificate with a library context in PEM format from a BIO:
439 X509 *x = X509_new_with_libctx(libctx, NULL);
444 if (PEM_read_bio_X509(bp, &x, 0, NULL) == NULL)
447 Read a certificate in PEM format from a BIO:
451 x = PEM_read_bio_X509(bp, NULL, 0, NULL);
459 if (!PEM_read_bio_X509(bp, &x, 0, NULL))
462 Write a certificate to a BIO:
464 if (!PEM_write_bio_X509(bp, x))
467 Write a private key (using traditional format) to a BIO using
468 triple DES encryption, the pass phrase is prompted for:
470 if (!PEM_write_bio_PrivateKey(bp, key, EVP_des_ede3_cbc(), NULL, 0, 0, NULL))
473 Write a private key (using PKCS#8 format) to a BIO using triple
474 DES encryption, using the pass phrase "hello":
476 if (!PEM_write_bio_PKCS8PrivateKey(bp, key, EVP_des_ede3_cbc(),
477 NULL, 0, 0, "hello"))
480 Read a private key from a BIO using a pass phrase callback:
482 key = PEM_read_bio_PrivateKey(bp, NULL, pass_cb, "My Private Key");
486 Skeleton pass phrase callback:
488 int pass_cb(char *buf, int size, int rwflag, void *u)
491 /* We'd probably do something else if 'rwflag' is 1 */
492 printf("Enter pass phrase for \"%s\"\n", (char *)u);
494 /* get pass phrase, length 'len' into 'tmp' */
496 if (tmp == NULL) /* An error occurred */
499 size_t len = strlen(tmp);
503 memcpy(buf, tmp, len);
509 L<EVP_EncryptInit(3)>, L<EVP_BytesToKey(3)>,
510 L<passphrase-encoding(7)>
514 The old Netscape certificate sequences were no longer documented
515 in OpenSSL 1.1.0; applications should use the PKCS7 standard instead
516 as they will be formally deprecated in a future releases.
518 PEM_read_bio_PrivateKey_ex(), PEM_read_PrivateKey_ex(),
519 PEM_read_bio_PUBKEY_ex(), PEM_read_PUBKEY_ex() and
520 PEM_read_bio_Parameters_ex() were introduced in OpenSSL 3.0.
524 Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
526 Licensed under the Apache License 2.0 (the "License"). You may not use
527 this file except in compliance with the License. You can obtain a copy
528 in the file LICENSE in the source distribution or at
529 L<https://www.openssl.org/source/license.html>.