]>
Commit | Line | Data |
---|---|---|
6725682d SL |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
d8652be0 | 5 | PEM_X509_INFO_read_bio_ex, PEM_X509_INFO_read_ex |
321ac1f2 | 6 | - read PEM-encoded data structures into one or more B<X509_INFO> objects |
6725682d SL |
7 | |
8 | =head1 SYNOPSIS | |
9 | ||
10 | #include <openssl/pem.h> | |
11 | ||
d8652be0 MC |
12 | STACK_OF(X509_INFO) *PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk, |
13 | pem_password_cb *cb, void *u, | |
b4250010 | 14 | OSSL_LIB_CTX *libctx, |
d8652be0 | 15 | const char *propq); |
6725682d | 16 | |
d8652be0 MC |
17 | STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio_ex(BIO *bio, |
18 | STACK_OF(X509_INFO) *sk, | |
19 | pem_password_cb *cb, void *u, | |
b4250010 | 20 | OSSL_LIB_CTX *libctx, |
d8652be0 | 21 | const char *propq); |
6725682d SL |
22 | |
23 | =head1 DESCRIPTION | |
24 | ||
d8652be0 | 25 | PEM_X509_INFO_read_ex() loads the B<X509_INFO> objects from a file I<fp>. |
6725682d | 26 | |
321ac1f2 DDO |
27 | PEM_X509_INFO_read_bio_ex loads the B<X509_INFO> objects using a bio I<bp>. |
28 | ||
29 | Each of the loaded B<X509_INFO> objects can contain a CRL, a certificate, | |
4957d952 | 30 | and/or a private key. |
321ac1f2 DDO |
31 | |
32 | The elements are read sequentially, and as far as they are of different type than | |
33 | the elements read before, they are combined into the same B<X509_INFO> object. | |
34 | The idea behind this is that if, for instance, a certificate is followed by | |
35 | a private key, the private key is supposed to correspond to the certificate. | |
6725682d | 36 | |
321ac1f2 DDO |
37 | If the input stack I<sk> is NULL a new stack is allocated, |
38 | else the given stack is extended. | |
39 | ||
40 | The optional I<cb> and I<u> parameters can be used for providing a pass phrase | |
41 | needed for decrypting encrypted PEM structures (normally only private keys). | |
42 | See L<PEM_read_bio_PrivateKey(3)> and L<passphrase-encoding(7)> for details. | |
43 | ||
44 | The library context I<libctx> and property query <propq> are used for fetching | |
45 | algorithms from providers. | |
6725682d SL |
46 | |
47 | =head1 RETURN VALUES | |
48 | ||
746f3674 | 49 | PEM_X509_INFO_read_ex() and PEM_X509_INFO_read_bio_ex() return |
6725682d SL |
50 | a stack of B<X509_INFO> objects or NULL on failure. |
51 | ||
52 | =head1 SEE ALSO | |
53 | ||
54 | L<PEM_read_bio_ex(3)>, | |
321ac1f2 | 55 | L<PEM_read_bio_PrivateKey(3)>, |
6725682d SL |
56 | L<passphrase-encoding(7)> |
57 | ||
58 | =head1 HISTORY | |
59 | ||
d8652be0 MC |
60 | The functions PEM_X509_INFO_read_ex() and |
61 | PEM_X509_INFO_read_bio_ex() were added in OpenSSL 3.0. | |
6725682d SL |
62 | |
63 | =head1 COPYRIGHT | |
64 | ||
65 | Copyright 2020 The OpenSSL Project Authors. All Rights Reserved. | |
66 | ||
67 | Licensed under the Apache License 2.0 (the "License"). You may not use | |
68 | this file except in compliance with the License. You can obtain a copy | |
69 | in the file LICENSE in the source distribution or at | |
70 | L<https://www.openssl.org/source/license.html>. | |
71 | ||
72 | =cut |