PEM_X509_INFO_read_bio_ex.pod 3.2 KB

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