1SSL_CTX_SET1_VERIFY_CERT_STORE(3)   OpenSSL  SSL_CTX_SET1_VERIFY_CERT_STORE(3)
2
3
4

NAME

6       SSL_CTX_set0_verify_cert_store, SSL_CTX_set1_verify_cert_store,
7       SSL_CTX_set0_chain_cert_store, SSL_CTX_set1_chain_cert_store,
8       SSL_set0_verify_cert_store, SSL_set1_verify_cert_store,
9       SSL_set0_chain_cert_store, SSL_set1_chain_cert_store,
10       SSL_CTX_get0_verify_cert_store, SSL_CTX_get0_chain_cert_store,
11       SSL_get0_verify_cert_store, SSL_get0_chain_cert_store - set certificate
12       verification or chain store
13

SYNOPSIS

15        #include <openssl/ssl.h>
16
17        int SSL_CTX_set0_verify_cert_store(SSL_CTX *ctx, X509_STORE *st);
18        int SSL_CTX_set1_verify_cert_store(SSL_CTX *ctx, X509_STORE *st);
19        int SSL_CTX_set0_chain_cert_store(SSL_CTX *ctx, X509_STORE *st);
20        int SSL_CTX_set1_chain_cert_store(SSL_CTX *ctx, X509_STORE *st);
21        int SSL_CTX_get0_verify_cert_store(SSL_CTX *ctx, X509_STORE **st);
22        int SSL_CTX_get0_chain_cert_store(SSL_CTX *ctx, X509_STORE **st);
23
24        int SSL_set0_verify_cert_store(SSL *ctx, X509_STORE *st);
25        int SSL_set1_verify_cert_store(SSL *ctx, X509_STORE *st);
26        int SSL_set0_chain_cert_store(SSL *ctx, X509_STORE *st);
27        int SSL_set1_chain_cert_store(SSL *ctx, X509_STORE *st);
28        int SSL_get0_verify_cert_store(SSL *ctx, X509_STORE **st);
29        int SSL_get0_chain_cert_store(SSL *ctx, X509_STORE **st);
30

DESCRIPTION

32       SSL_CTX_set0_verify_cert_store() and SSL_CTX_set1_verify_cert_store()
33       set the certificate store used for certificate verification to st.
34
35       SSL_CTX_set0_chain_cert_store() and SSL_CTX_set1_chain_cert_store() set
36       the certificate store used for certificate chain building to st.
37
38       SSL_set0_verify_cert_store(), SSL_set1_verify_cert_store(),
39       SSL_set0_chain_cert_store() and SSL_set1_chain_cert_store() are similar
40       except they apply to SSL structure ssl.
41
42       SSL_CTX_get0_verify_chain_store(), SSL_get0_verify_chain_store(),
43       SSL_CTX_get0_chain_cert_store() and SSL_get0_chain_cert_store()
44       retrieve the objects previously set via the above calls. A pointer to
45       the object (or NULL if no such object has been set) is written to *st.
46
47       All these functions are implemented as macros. Those containing a 1
48       increment the reference count of the supplied store so it must be freed
49       at some point after the operation. Those containing a 0 do not
50       increment reference counts and the supplied store MUST NOT be freed
51       after the operation.
52

NOTES

54       The stores pointers associated with an SSL_CTX structure are copied to
55       any SSL structures when SSL_new() is called. As a result SSL structures
56       will not be affected if the parent SSL_CTX store pointer is set to a
57       new value.
58
59       The verification store is used to verify the certificate chain sent by
60       the peer: that is an SSL/TLS client will use the verification store to
61       verify the server's certificate chain and a SSL/TLS server will use it
62       to verify any client certificate chain.
63
64       The chain store is used to build the certificate chain.
65
66       If the mode SSL_MODE_NO_AUTO_CHAIN is set or a certificate chain is
67       configured already (for example using the functions such as
68       SSL_CTX_add1_chain_cert(3) or SSL_CTX_add_extra_chain_cert(3)) then
69       automatic chain building is disabled.
70
71       If the mode SSL_MODE_NO_AUTO_CHAIN is set then automatic chain building
72       is disabled.
73
74       If the chain or the verification store is not set then the store
75       associated with the parent SSL_CTX is used instead to retain
76       compatibility with previous versions of OpenSSL.
77

RETURN VALUES

79       All these functions return 1 for success and 0 for failure.
80

SEE ALSO

82       SSL_CTX_add_extra_chain_cert(3) SSL_CTX_set0_chain(3)
83       SSL_CTX_set1_chain(3) SSL_CTX_add0_chain_cert(3)
84       SSL_CTX_add1_chain_cert(3) SSL_set0_chain(3) SSL_set1_chain(3)
85       SSL_add0_chain_cert(3) SSL_add1_chain_cert(3)
86       SSL_CTX_build_cert_chain(3) SSL_build_cert_chain(3)
87

HISTORY

89       These functions were added in OpenSSL 1.0.2.
90
92       Copyright 2013-2022 The OpenSSL Project Authors. All Rights Reserved.
93
94       Licensed under the OpenSSL license (the "License").  You may not use
95       this file except in compliance with the License.  You can obtain a copy
96       in the file LICENSE in the source distribution or at
97       <https://www.openssl.org/source/license.html>.
98
99
100
1011.1.1q                            2023-02-06 SSL_CTX_SET1_VERIFY_CERT_STORE(3)
Impressum