Fix grammar in certificates.txt
[openssl.git] / doc / man3 / PEM_X509_INFO_read_bio_ex.pod
1 =pod
2
3 =head1 NAME
4
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
7
8 =head1 SYNOPSIS
9
10  #include <openssl/pem.h>
11
12  STACK_OF(X509_INFO) *PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk,
13                                             pem_password_cb *cb, void *u,
14                                             OSSL_LIB_CTX *libctx,
15                                             const char *propq);
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,
21                                                 OSSL_LIB_CTX *libctx,
22                                                 const char *propq);
23  STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk,
24                                              pem_password_cb *cb, void *u);
25
26 =head1 DESCRIPTION
27
28 PEM_X509_INFO_read_ex() loads the B<X509_INFO> objects from a file I<fp>.
29
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>.
33
34 PEM_X509_INFO_read_bio_ex() loads the B<X509_INFO> objects using a bio I<bp>.
35
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>.
39
40 Each of the loaded B<X509_INFO> objects can contain a CRL, a certificate,
41 and/or a private key.
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.
46
47 If the input stack I<sk> is NULL a new stack is allocated,
48 else the given stack is extended.
49
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.
53
54 The library context I<libctx> and property query I<propq> are used for fetching
55 algorithms from providers.
56
57 =head1 RETURN VALUES
58
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.
62
63 =head1 SEE ALSO
64
65 L<PEM_read_bio_ex(3)>,
66 L<PEM_read_bio_PrivateKey(3)>,
67 L<passphrase-encoding(7)>
68
69 =head1 HISTORY
70
71 The functions PEM_X509_INFO_read_ex() and
72 PEM_X509_INFO_read_bio_ex() were added in OpenSSL 3.0.
73
74 =head1 COPYRIGHT
75
76 Copyright 2020-2022 The OpenSSL Project Authors. All Rights Reserved.
77
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>.
82
83 =cut