2
0

SSL_load_client_CA_file.pod 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. =pod
  2. =head1 NAME
  3. SSL_load_client_CA_file - load certificate names from file
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
  7. =head1 DESCRIPTION
  8. SSL_load_client_CA_file() reads certificates from B<file> and returns
  9. a STACK_OF(X509_NAME) with the subject names found.
  10. =head1 NOTES
  11. SSL_load_client_CA_file() reads a file of PEM formatted certificates and
  12. extracts the X509_NAMES of the certificates found. While the name suggests
  13. the specific usage as support function for
  14. L<SSL_CTX_set_client_CA_list(3)>,
  15. it is not limited to CA certificates.
  16. =head1 EXAMPLES
  17. Load names of CAs from file and use it as a client CA list:
  18. SSL_CTX *ctx;
  19. STACK_OF(X509_NAME) *cert_names;
  20. ...
  21. cert_names = SSL_load_client_CA_file("/path/to/CAfile.pem");
  22. if (cert_names != NULL)
  23. SSL_CTX_set_client_CA_list(ctx, cert_names);
  24. else
  25. /* error */
  26. ...
  27. =head1 RETURN VALUES
  28. The following return values can occur:
  29. =over 4
  30. =item NULL
  31. The operation failed, check out the error stack for the reason.
  32. =item Pointer to STACK_OF(X509_NAME)
  33. Pointer to the subject names of the successfully read certificates.
  34. =back
  35. =head1 SEE ALSO
  36. L<ssl(7)>,
  37. L<SSL_CTX_set_client_CA_list(3)>
  38. =head1 COPYRIGHT
  39. Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
  40. Licensed under the OpenSSL license (the "License"). You may not use
  41. this file except in compliance with the License. You can obtain a copy
  42. in the file LICENSE in the source distribution or at
  43. L<https://www.openssl.org/source/license.html>.
  44. =cut