PEM_X509_INFO_read_bio_ex.pod 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. =pod
  2. =head1 NAME
  3. PEM_X509_INFO_read_bio_ex, PEM_X509_INFO_read_ex
  4. - read PEM-encoded data structures into one or more B<X509_INFO> objects
  5. =head1 SYNOPSIS
  6. #include <openssl/pem.h>
  7. STACK_OF(X509_INFO) *PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk,
  8. pem_password_cb *cb, void *u,
  9. OSSL_LIB_CTX *libctx,
  10. const char *propq);
  11. STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio_ex(BIO *bio,
  12. STACK_OF(X509_INFO) *sk,
  13. pem_password_cb *cb, void *u,
  14. OSSL_LIB_CTX *libctx,
  15. const char *propq);
  16. =head1 DESCRIPTION
  17. PEM_X509_INFO_read_ex() loads the B<X509_INFO> objects from a file I<fp>.
  18. PEM_X509_INFO_read_bio_ex loads the B<X509_INFO> objects using a bio I<bp>.
  19. Each of the loaded B<X509_INFO> objects can contain a CRL, a certificate,
  20. and/or a private key.
  21. The elements are read sequentially, and as far as they are of different type than
  22. the elements read before, they are combined into the same B<X509_INFO> object.
  23. The idea behind this is that if, for instance, a certificate is followed by
  24. a private key, the private key is supposed to correspond to the certificate.
  25. If the input stack I<sk> is NULL a new stack is allocated,
  26. else the given stack is extended.
  27. The optional I<cb> and I<u> parameters can be used for providing a pass phrase
  28. needed for decrypting encrypted PEM structures (normally only private keys).
  29. See L<PEM_read_bio_PrivateKey(3)> and L<passphrase-encoding(7)> for details.
  30. The library context I<libctx> and property query <propq> are used for fetching
  31. algorithms from providers.
  32. =head1 RETURN VALUES
  33. PEM_X509_INFO_read_ex() and PEM_X509_INFO_read_bio_ex() return
  34. a stack of B<X509_INFO> objects or NULL on failure.
  35. =head1 SEE ALSO
  36. L<PEM_read_bio_ex(3)>,
  37. L<PEM_read_bio_PrivateKey(3)>,
  38. L<passphrase-encoding(7)>
  39. =head1 HISTORY
  40. The functions PEM_X509_INFO_read_ex() and
  41. PEM_X509_INFO_read_bio_ex() were added in OpenSSL 3.0.
  42. =head1 COPYRIGHT
  43. Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
  44. Licensed under the Apache License 2.0 (the "License"). You may not use
  45. this file except in compliance with the License. You can obtain a copy
  46. in the file LICENSE in the source distribution or at
  47. L<https://www.openssl.org/source/license.html>.
  48. =cut