SSL_CTX_set_cert_store.pod 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_set_cert_store, SSL_CTX_get_cert_store - manipulate X509 certificate verification storage
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. void SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store);
  7. X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *ctx);
  8. =head1 DESCRIPTION
  9. SSL_CTX_set_cert_store() sets/replaces the certificate verification storage
  10. of B<ctx> to/with B<store>. If another X509_STORE object is currently
  11. set in B<ctx>, it will be X509_STORE_free()ed.
  12. SSL_CTX_get_cert_store() returns a pointer to the current certificate
  13. verification storage.
  14. =head1 NOTES
  15. In order to verify the certificates presented by the peer, trusted CA
  16. certificates must be accessed. These CA certificates are made available
  17. via lookup methods, handled inside the X509_STORE. From the X509_STORE
  18. the X509_STORE_CTX used when verifying certificates is created.
  19. Typically the trusted certificate store is handled indirectly via using
  20. L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>.
  21. Using the SSL_CTX_set_cert_store() and SSL_CTX_get_cert_store() functions
  22. it is possible to manipulate the X509_STORE object beyond the
  23. L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>
  24. call.
  25. Currently no detailed documentation on how to use the X509_STORE
  26. object is available. Not all members of the X509_STORE are used when
  27. the verification takes place. So will e.g. the verify_callback() be
  28. overridden with the verify_callback() set via the
  29. L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)> family of functions.
  30. This document must therefore be updated when documentation about the
  31. X509_STORE object and its handling becomes available.
  32. =head1 RESTRICTIONS
  33. The X509_STORE structure used by an SSL_CTX is used for verifying peer
  34. certificates and building certificate chains, it is also shared by
  35. every child SSL structure. Applications wanting finer control can use
  36. functions such as SSL_CTX_set1_verify_cert_store() instead.
  37. =head1 RETURN VALUES
  38. SSL_CTX_set_cert_store() does not return diagnostic output.
  39. SSL_CTX_get_cert_store() returns the current setting.
  40. =head1 SEE ALSO
  41. L<ssl(3)|ssl(3)>,
  42. L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>,
  43. L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>
  44. =cut