5 SSL_CTX_set_cert_store, SSL_CTX_get_cert_store - manipulate X509 certificate verification storage
9 #include <openssl/ssl.h>
11 void SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store);
12 X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *ctx);
16 SSL_CTX_set_cert_store() sets/replaces the certificate verification storage
17 of B<ctx> to/with B<store>. If another X509_STORE object is currently
18 set in B<ctx>, it will be X509_STORE_free()ed.
20 SSL_CTX_get_cert_store() returns a pointer to the current certificate
25 In order to verify the certificates presented by the peer, trusted CA
26 certificates must be accessed. These CA certificates are made available
27 via lookup methods, handled inside the X509_STORE. From the X509_STORE
28 the X509_STORE_CTX used when verifying certificates is created.
30 Typically the trusted certificate store is handled indirectly via using
31 L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>.
32 Using the SSL_CTX_set_cert_store() and SSL_CTX_get_cert_store() functions
33 it is possible to manipulate the X509_STORE object beyond the
34 L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>
37 Currently no detailed documentation on how to use the X509_STORE
38 object is available. Not all members of the X509_STORE are used when
39 the verification takes place. So will e.g. the verify_callback() be
40 overridden with the verify_callback() set via the
41 L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)> family of functions.
42 This document must therefore be updated when documentation about the
43 X509_STORE object and its handling becomes available.
47 SSL_CTX_set_cert_store() does not return diagnostic output.
49 SSL_CTX_get_cert_store() returns the current setting.
54 L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>,
55 L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>