SSL_CTX_set_cert_store.pod 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 RETURN VALUES
  33. SSL_CTX_set_cert_store() does not return diagnostic output.
  34. SSL_CTX_get_cert_store() returns the current setting.
  35. =head1 SEE ALSO
  36. L<ssl(3)|ssl(3)>,
  37. L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>,
  38. L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>
  39. =cut