| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "SSL_CTX_SET1_VERIFY_CERT_STORE 3SSL" |
| 58 |
.TH SSL_CTX_SET1_VERIFY_CERT_STORE 3SSL 2026-04-07 3.6.2 OpenSSL |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
SSL_CTX_set0_verify_cert_store, SSL_CTX_set1_verify_cert_store, |
| 65 |
SSL_CTX_set0_chain_cert_store, SSL_CTX_set1_chain_cert_store, |
| 66 |
SSL_set0_verify_cert_store, SSL_set1_verify_cert_store, |
| 67 |
SSL_set0_chain_cert_store, SSL_set1_chain_cert_store, |
| 68 |
SSL_CTX_get0_verify_cert_store, SSL_CTX_get0_chain_cert_store, |
| 69 |
SSL_get0_verify_cert_store, SSL_get0_chain_cert_store \- set certificate |
| 70 |
verification or chain store |
| 71 |
.SH SYNOPSIS |
| 72 |
.IX Header "SYNOPSIS" |
| 73 |
.Vb 1 |
| 74 |
\& #include <openssl/ssl.h> |
| 75 |
\& |
| 76 |
\& int SSL_CTX_set0_verify_cert_store(SSL_CTX *ctx, X509_STORE *st); |
| 77 |
\& int SSL_CTX_set1_verify_cert_store(SSL_CTX *ctx, X509_STORE *st); |
| 78 |
\& int SSL_CTX_set0_chain_cert_store(SSL_CTX *ctx, X509_STORE *st); |
| 79 |
\& int SSL_CTX_set1_chain_cert_store(SSL_CTX *ctx, X509_STORE *st); |
| 80 |
\& int SSL_CTX_get0_verify_cert_store(SSL_CTX *ctx, X509_STORE **st); |
| 81 |
\& int SSL_CTX_get0_chain_cert_store(SSL_CTX *ctx, X509_STORE **st); |
| 82 |
\& |
| 83 |
\& int SSL_set0_verify_cert_store(SSL *ctx, X509_STORE *st); |
| 84 |
\& int SSL_set1_verify_cert_store(SSL *ctx, X509_STORE *st); |
| 85 |
\& int SSL_set0_chain_cert_store(SSL *ctx, X509_STORE *st); |
| 86 |
\& int SSL_set1_chain_cert_store(SSL *ctx, X509_STORE *st); |
| 87 |
\& int SSL_get0_verify_cert_store(SSL *ctx, X509_STORE **st); |
| 88 |
\& int SSL_get0_chain_cert_store(SSL *ctx, X509_STORE **st); |
| 89 |
.Ve |
| 90 |
.SH DESCRIPTION |
| 91 |
.IX Header "DESCRIPTION" |
| 92 |
\&\fBSSL_CTX_set0_verify_cert_store()\fR and \fBSSL_CTX_set1_verify_cert_store()\fR |
| 93 |
set the certificate store used for certificate verification to \fBst\fR. |
| 94 |
.PP |
| 95 |
\&\fBSSL_CTX_set0_chain_cert_store()\fR and \fBSSL_CTX_set1_chain_cert_store()\fR |
| 96 |
set the certificate store used for certificate chain building to \fBst\fR. |
| 97 |
.PP |
| 98 |
\&\fBSSL_set0_verify_cert_store()\fR, \fBSSL_set1_verify_cert_store()\fR, |
| 99 |
\&\fBSSL_set0_chain_cert_store()\fR and \fBSSL_set1_chain_cert_store()\fR are similar |
| 100 |
except they apply to SSL structure \fBssl\fR. |
| 101 |
.PP |
| 102 |
\&\fBSSL_CTX_get0_verify_chain_store()\fR, \fBSSL_get0_verify_chain_store()\fR, |
| 103 |
\&\fBSSL_CTX_get0_chain_cert_store()\fR and \fBSSL_get0_chain_cert_store()\fR retrieve the |
| 104 |
objects previously set via the above calls. A pointer to the object (or NULL if |
| 105 |
no such object has been set) is written to \fB*st\fR. |
| 106 |
.PP |
| 107 |
All these functions are implemented as macros. Those containing a \fB1\fR |
| 108 |
increment the reference count of the supplied store so it must |
| 109 |
be freed at some point after the operation. Those containing a \fB0\fR do |
| 110 |
not increment reference counts and the supplied store \fBMUST NOT\fR be freed |
| 111 |
after the operation. |
| 112 |
.SH NOTES |
| 113 |
.IX Header "NOTES" |
| 114 |
The stores pointers associated with an SSL_CTX structure are copied to any SSL |
| 115 |
structures when \fBSSL_new()\fR is called. As a result SSL structures will not be |
| 116 |
affected if the parent SSL_CTX store pointer is set to a new value. |
| 117 |
.PP |
| 118 |
The verification store is used to verify the certificate chain sent by the |
| 119 |
peer: that is an SSL/TLS client will use the verification store to verify |
| 120 |
the server's certificate chain and an SSL/TLS server will use it to verify |
| 121 |
any client certificate chain. |
| 122 |
.PP |
| 123 |
The chain store is used to build the certificate chain. |
| 124 |
Details of the chain building and checking process are described in |
| 125 |
"Certification Path Building" in \fBopenssl\-verification\-options\fR\|(1) and |
| 126 |
"Certification Path Validation" in \fBopenssl\-verification\-options\fR\|(1). |
| 127 |
.PP |
| 128 |
If the mode \fBSSL_MODE_NO_AUTO_CHAIN\fR is set or a certificate chain is |
| 129 |
configured already (for example using the functions such as |
| 130 |
\&\fBSSL_CTX_add1_chain_cert\fR\|(3) or |
| 131 |
\&\fBSSL_CTX_add_extra_chain_cert\fR\|(3)) then |
| 132 |
automatic chain building is disabled. |
| 133 |
.PP |
| 134 |
If the mode \fBSSL_MODE_NO_AUTO_CHAIN\fR is set then automatic chain building |
| 135 |
is disabled. |
| 136 |
.PP |
| 137 |
If the chain or the verification store is not set then the store associated |
| 138 |
with the parent SSL_CTX is used instead to retain compatibility with previous |
| 139 |
versions of OpenSSL. |
| 140 |
.SH "RETURN VALUES" |
| 141 |
.IX Header "RETURN VALUES" |
| 142 |
All these functions return 1 for success and 0 for failure. |
| 143 |
.SH "SEE ALSO" |
| 144 |
.IX Header "SEE ALSO" |
| 145 |
\&\fBssl\fR\|(7), |
| 146 |
\&\fBSSL_CTX_add_extra_chain_cert\fR\|(3) |
| 147 |
\&\fBSSL_CTX_set0_chain\fR\|(3) |
| 148 |
\&\fBSSL_CTX_set1_chain\fR\|(3) |
| 149 |
\&\fBSSL_CTX_add0_chain_cert\fR\|(3) |
| 150 |
\&\fBSSL_CTX_add1_chain_cert\fR\|(3) |
| 151 |
\&\fBSSL_set0_chain\fR\|(3) |
| 152 |
\&\fBSSL_set1_chain\fR\|(3) |
| 153 |
\&\fBSSL_add0_chain_cert\fR\|(3) |
| 154 |
\&\fBSSL_add1_chain_cert\fR\|(3) |
| 155 |
\&\fBSSL_CTX_build_cert_chain\fR\|(3) |
| 156 |
\&\fBSSL_build_cert_chain\fR\|(3) |
| 157 |
.SH HISTORY |
| 158 |
.IX Header "HISTORY" |
| 159 |
These functions were added in OpenSSL 1.0.2. |
| 160 |
.SH COPYRIGHT |
| 161 |
.IX Header "COPYRIGHT" |
| 162 |
Copyright 2013\-2022 The OpenSSL Project Authors. All Rights Reserved. |
| 163 |
.PP |
| 164 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 165 |
this file except in compliance with the License. You can obtain a copy |
| 166 |
in the file LICENSE in the source distribution or at |
| 167 |
<https://www.openssl.org/source/license.html>. |