1SSL_CTX_SET1_VERIFY_CERT_STORE(3ossl)OpenSSSLSL_CTX_SET1_VERIFY_CERT_STORE(3ossl)
2
3
4
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
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
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
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. Details of the
65 chain building and checking process are described in "Certification
66 Path Building" in openssl-verification-options(1) and "Certification
67 Path Validation" in openssl-verification-options(1).
68
69 If the mode SSL_MODE_NO_AUTO_CHAIN is set or a certificate chain is
70 configured already (for example using the functions such as
71 SSL_CTX_add1_chain_cert(3) or SSL_CTX_add_extra_chain_cert(3)) then
72 automatic chain building is disabled.
73
74 If the mode SSL_MODE_NO_AUTO_CHAIN is set then automatic chain building
75 is disabled.
76
77 If the chain or the verification store is not set then the store
78 associated with the parent SSL_CTX is used instead to retain
79 compatibility with previous versions of OpenSSL.
80
82 All these functions return 1 for success and 0 for failure.
83
85 ssl(7), SSL_CTX_add_extra_chain_cert(3) SSL_CTX_set0_chain(3)
86 SSL_CTX_set1_chain(3) SSL_CTX_add0_chain_cert(3)
87 SSL_CTX_add1_chain_cert(3) SSL_set0_chain(3) SSL_set1_chain(3)
88 SSL_add0_chain_cert(3) SSL_add1_chain_cert(3)
89 SSL_CTX_build_cert_chain(3) SSL_build_cert_chain(3)
90
92 These functions were added in OpenSSL 1.0.2.
93
95 Copyright 2013-2022 The OpenSSL Project Authors. All Rights Reserved.
96
97 Licensed under the Apache License 2.0 (the "License"). You may not use
98 this file except in compliance with the License. You can obtain a copy
99 in the file LICENSE in the source distribution or at
100 <https://www.openssl.org/source/license.html>.
101
102
103
1043.0.9 2023-07-S2S7L_CTX_SET1_VERIFY_CERT_STORE(3ossl)