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