1SSL_CTX_set_cert_store(3)           OpenSSL          SSL_CTX_set_cert_store(3)
2
3
4

NAME

6       SSL_CTX_set_cert_store, SSL_CTX_get_cert_store - manipulate X509
7       certificate verification storage
8

SYNOPSIS

10        #include <openssl/ssl.h>
11
12        void SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store);
13        X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *ctx);
14

DESCRIPTION

16       SSL_CTX_set_cert_store() sets/replaces the certificate verification
17       storage of ctx to/with store. If another X509_STORE object is currently
18       set in ctx, it will be X509_STORE_free()ed.
19
20       SSL_CTX_get_cert_store() returns a pointer to the current certificate
21       verification storage.
22

NOTES

24       In order to verify the certificates presented by the peer, trusted CA
25       certificates must be accessed. These CA certificates are made available
26       via lookup methods, handled inside the X509_STORE. From the X509_STORE
27       the X509_STORE_CTX used when verifying certificates is created.
28
29       Typically the trusted certificate store is handled indirectly via using
30       SSL_CTX_load_verify_locations(3).  Using the SSL_CTX_set_cert_store()
31       and SSL_CTX_get_cert_store() functions it is possible to manipulate the
32       X509_STORE object beyond the SSL_CTX_load_verify_locations(3) call.
33
34       Currently no detailed documentation on how to use the X509_STORE object
35       is available. Not all members of the X509_STORE are used when the
36       verification takes place. So will e.g. the verify_callback() be
37       overridden with the verify_callback() set via the SSL_CTX_set_verify(3)
38       family of functions.  This document must therefore be updated when
39       documentation about the X509_STORE object and its handling becomes
40       available.
41

RESTRICTIONS

43       The X509_STORE structure used by an SSL_CTX is used for verifying peer
44       certificates and building certificate chains, it is also shared by
45       every child SSL structure. Applications wanting finer control can use
46       functions such as SSL_CTX_set1_verify_cert_store() instead.
47

RETURN VALUES

49       SSL_CTX_set_cert_store() does not return diagnostic output.
50
51       SSL_CTX_get_cert_store() returns the current setting.
52

SEE ALSO

54       ssl(3), SSL_CTX_load_verify_locations(3), SSL_CTX_set_verify(3)
55
56
57
581.0.2o                            2020-08-01         SSL_CTX_set_cert_store(3)
Impressum