5 PEM_X509_INFO_read_ex, PEM_X509_INFO_read, PEM_X509_INFO_read_bio_ex, PEM_X509_INFO_read_bio
6 - read PEM-encoded data structures into one or more B<X509_INFO> objects
10 #include <openssl/pem.h>
12 STACK_OF(X509_INFO) *PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk,
13 pem_password_cb *cb, void *u,
16 STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
17 pem_password_cb *cb, void *u);
18 STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio_ex(BIO *bio,
19 STACK_OF(X509_INFO) *sk,
20 pem_password_cb *cb, void *u,
23 STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk,
24 pem_password_cb *cb, void *u);
28 PEM_X509_INFO_read_ex() loads the B<X509_INFO> objects from a file I<fp>.
30 PEM_X509_INFO_read() is similar to PEM_X509_INFO_read_ex()
31 but uses the default (NULL) library context I<libctx>
32 and empty property query I<propq>.
34 PEM_X509_INFO_read_bio_ex() loads the B<X509_INFO> objects using a bio I<bp>.
36 PEM_X509_INFO_read_bio() is similar to PEM_X509_INFO_read_bio_ex()
37 but uses the default (NULL) library context I<libctx>
38 and empty property query I<propq>.
40 Each of the loaded B<X509_INFO> objects can contain a CRL, a certificate,
42 The elements are read sequentially, and as far as they are of different type than
43 the elements read before, they are combined into the same B<X509_INFO> object.
44 The idea behind this is that if, for instance, a certificate is followed by
45 a private key, the private key is supposed to correspond to the certificate.
47 If the input stack I<sk> is NULL a new stack is allocated,
48 else the given stack is extended.
50 The optional I<cb> and I<u> parameters can be used for providing a pass phrase
51 needed for decrypting encrypted PEM structures (normally only private keys).
52 See L<PEM_read_bio_PrivateKey(3)> and L<passphrase-encoding(7)> for details.
54 The library context I<libctx> and property query I<propq> are used for fetching
55 algorithms from providers.
59 PEM_X509_INFO_read_ex(), PEM_X509_INFO_read(),
60 PEM_X509_INFO_read_bio_ex() and PEM_X509_INFO_read_bio() return
61 a stack of B<X509_INFO> objects or NULL on failure.
65 L<PEM_read_bio_ex(3)>,
66 L<PEM_read_bio_PrivateKey(3)>,
67 L<passphrase-encoding(7)>
71 The functions PEM_X509_INFO_read_ex() and
72 PEM_X509_INFO_read_bio_ex() were added in OpenSSL 3.0.
76 Copyright 2020-2022 The OpenSSL Project Authors. All Rights Reserved.
78 Licensed under the Apache License 2.0 (the "License"). You may not use
79 this file except in compliance with the License. You can obtain a copy
80 in the file LICENSE in the source distribution or at
81 L<https://www.openssl.org/source/license.html>.