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