2020-07-24 20:53:27 +08:00
|
|
|
=pod
|
|
|
|
|
|
|
|
=head1 NAME
|
|
|
|
|
2022-06-20 16:22:50 +08:00
|
|
|
PEM_X509_INFO_read_ex, PEM_X509_INFO_read, PEM_X509_INFO_read_bio_ex, PEM_X509_INFO_read_bio
|
2021-03-21 06:32:15 +08:00
|
|
|
- read PEM-encoded data structures into one or more B<X509_INFO> objects
|
2020-07-24 20:53:27 +08:00
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
#include <openssl/pem.h>
|
|
|
|
|
2020-09-24 17:42:23 +08:00
|
|
|
STACK_OF(X509_INFO) *PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk,
|
|
|
|
pem_password_cb *cb, void *u,
|
2020-10-15 17:55:50 +08:00
|
|
|
OSSL_LIB_CTX *libctx,
|
2020-09-24 17:42:23 +08:00
|
|
|
const char *propq);
|
2022-06-20 16:22:50 +08:00
|
|
|
STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
|
|
|
|
pem_password_cb *cb, void *u);
|
2020-09-24 17:42:23 +08:00
|
|
|
STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio_ex(BIO *bio,
|
|
|
|
STACK_OF(X509_INFO) *sk,
|
|
|
|
pem_password_cb *cb, void *u,
|
2020-10-15 17:55:50 +08:00
|
|
|
OSSL_LIB_CTX *libctx,
|
2020-09-24 17:42:23 +08:00
|
|
|
const char *propq);
|
2022-06-20 16:22:50 +08:00
|
|
|
STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk,
|
|
|
|
pem_password_cb *cb, void *u);
|
2020-07-24 20:53:27 +08:00
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
2020-09-24 17:42:23 +08:00
|
|
|
PEM_X509_INFO_read_ex() loads the B<X509_INFO> objects from a file I<fp>.
|
2020-07-24 20:53:27 +08:00
|
|
|
|
2022-06-20 16:22:50 +08:00
|
|
|
PEM_X509_INFO_read() is similar to PEM_X509_INFO_read_ex()
|
|
|
|
but uses the default (NULL) library context I<libctx>
|
|
|
|
and empty property query I<propq>.
|
|
|
|
|
2021-03-24 16:11:13 +08:00
|
|
|
PEM_X509_INFO_read_bio_ex() loads the B<X509_INFO> objects using a bio I<bp>.
|
2021-03-21 06:32:15 +08:00
|
|
|
|
2022-06-20 16:22:50 +08:00
|
|
|
PEM_X509_INFO_read_bio() is similar to PEM_X509_INFO_read_bio_ex()
|
|
|
|
but uses the default (NULL) library context I<libctx>
|
|
|
|
and empty property query I<propq>.
|
|
|
|
|
2021-03-21 06:32:15 +08:00
|
|
|
Each of the loaded B<X509_INFO> objects can contain a CRL, a certificate,
|
2021-03-22 23:23:24 +08:00
|
|
|
and/or a private key.
|
2021-03-21 06:32:15 +08:00
|
|
|
The elements are read sequentially, and as far as they are of different type than
|
|
|
|
the elements read before, they are combined into the same B<X509_INFO> object.
|
|
|
|
The idea behind this is that if, for instance, a certificate is followed by
|
|
|
|
a private key, the private key is supposed to correspond to the certificate.
|
2020-07-24 20:53:27 +08:00
|
|
|
|
2021-03-21 06:32:15 +08:00
|
|
|
If the input stack I<sk> is NULL a new stack is allocated,
|
|
|
|
else the given stack is extended.
|
|
|
|
|
|
|
|
The optional I<cb> and I<u> parameters can be used for providing a pass phrase
|
|
|
|
needed for decrypting encrypted PEM structures (normally only private keys).
|
|
|
|
See L<PEM_read_bio_PrivateKey(3)> and L<passphrase-encoding(7)> for details.
|
|
|
|
|
2022-06-20 16:22:50 +08:00
|
|
|
The library context I<libctx> and property query I<propq> are used for fetching
|
2021-03-21 06:32:15 +08:00
|
|
|
algorithms from providers.
|
2020-07-24 20:53:27 +08:00
|
|
|
|
|
|
|
=head1 RETURN VALUES
|
|
|
|
|
2022-06-20 16:22:50 +08:00
|
|
|
PEM_X509_INFO_read_ex(), PEM_X509_INFO_read(),
|
|
|
|
PEM_X509_INFO_read_bio_ex() and PEM_X509_INFO_read_bio() return
|
2020-07-24 20:53:27 +08:00
|
|
|
a stack of B<X509_INFO> objects or NULL on failure.
|
|
|
|
|
|
|
|
=head1 SEE ALSO
|
|
|
|
|
|
|
|
L<PEM_read_bio_ex(3)>,
|
2021-03-21 06:32:15 +08:00
|
|
|
L<PEM_read_bio_PrivateKey(3)>,
|
2020-07-24 20:53:27 +08:00
|
|
|
L<passphrase-encoding(7)>
|
|
|
|
|
|
|
|
=head1 HISTORY
|
|
|
|
|
2020-09-24 17:42:23 +08:00
|
|
|
The functions PEM_X509_INFO_read_ex() and
|
|
|
|
PEM_X509_INFO_read_bio_ex() were added in OpenSSL 3.0.
|
2020-07-24 20:53:27 +08:00
|
|
|
|
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
2022-06-20 16:22:50 +08:00
|
|
|
Copyright 2020-2022 The OpenSSL Project Authors. All Rights Reserved.
|
2020-07-24 20:53:27 +08:00
|
|
|
|
|
|
|
Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
|
|
this file except in compliance with the License. You can obtain a copy
|
|
|
|
in the file LICENSE in the source distribution or at
|
|
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
|
|
|
|
=cut
|