1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimSSL_get_ex_data_X509_STORE_CTX_idx,
6e71b7053SJung-uk KimSSL_CTX_set_verify, SSL_set_verify,
7e71b7053SJung-uk KimSSL_CTX_set_verify_depth, SSL_set_verify_depth,
8e71b7053SJung-uk KimSSL_verify_cb,
9e71b7053SJung-uk KimSSL_verify_client_post_handshake,
10e71b7053SJung-uk KimSSL_set_post_handshake_auth,
11e71b7053SJung-uk KimSSL_CTX_set_post_handshake_auth
12e71b7053SJung-uk Kim- set peer certificate verification parameters
13e71b7053SJung-uk Kim
14e71b7053SJung-uk Kim=head1 SYNOPSIS
15e71b7053SJung-uk Kim
16e71b7053SJung-uk Kim #include <openssl/ssl.h>
17e71b7053SJung-uk Kim
18e71b7053SJung-uk Kim typedef int (*SSL_verify_cb)(int preverify_ok, X509_STORE_CTX *x509_ctx);
19e71b7053SJung-uk Kim
20e71b7053SJung-uk Kim void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, SSL_verify_cb verify_callback);
21e71b7053SJung-uk Kim void SSL_set_verify(SSL *ssl, int mode, SSL_verify_cb verify_callback);
22e71b7053SJung-uk Kim SSL_get_ex_data_X509_STORE_CTX_idx(void);
23e71b7053SJung-uk Kim
24e71b7053SJung-uk Kim void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth);
25e71b7053SJung-uk Kim void SSL_set_verify_depth(SSL *ssl, int depth);
26e71b7053SJung-uk Kim
27e71b7053SJung-uk Kim int SSL_verify_client_post_handshake(SSL *ssl);
28e71b7053SJung-uk Kim void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val);
29e71b7053SJung-uk Kim void SSL_set_post_handshake_auth(SSL *ssl, int val);
30e71b7053SJung-uk Kim
31e71b7053SJung-uk Kim=head1 DESCRIPTION
32e71b7053SJung-uk Kim
33e71b7053SJung-uk KimSSL_CTX_set_verify() sets the verification flags for B<ctx> to be B<mode> and
34e71b7053SJung-uk Kimspecifies the B<verify_callback> function to be used. If no callback function
35e71b7053SJung-uk Kimshall be specified, the NULL pointer can be used for B<verify_callback>.
36e71b7053SJung-uk Kim
37e71b7053SJung-uk KimSSL_set_verify() sets the verification flags for B<ssl> to be B<mode> and
38e71b7053SJung-uk Kimspecifies the B<verify_callback> function to be used. If no callback function
39e71b7053SJung-uk Kimshall be specified, the NULL pointer can be used for B<verify_callback>. In
40e71b7053SJung-uk Kimthis case last B<verify_callback> set specifically for this B<ssl> remains. If
41e71b7053SJung-uk Kimno special B<callback> was set before, the default callback for the underlying
42e71b7053SJung-uk KimB<ctx> is used, that was valid at the time B<ssl> was created with
43e71b7053SJung-uk KimL<SSL_new(3)>. Within the callback function,
44e71b7053SJung-uk KimB<SSL_get_ex_data_X509_STORE_CTX_idx> can be called to get the data index
45e71b7053SJung-uk Kimof the current SSL object that is doing the verification.
46e71b7053SJung-uk Kim
47e71b7053SJung-uk KimSSL_CTX_set_verify_depth() sets the maximum B<depth> for the certificate chain
48e71b7053SJung-uk Kimverification that shall be allowed for B<ctx>.
49e71b7053SJung-uk Kim
50e71b7053SJung-uk KimSSL_set_verify_depth() sets the maximum B<depth> for the certificate chain
51e71b7053SJung-uk Kimverification that shall be allowed for B<ssl>.
52e71b7053SJung-uk Kim
53e71b7053SJung-uk KimSSL_CTX_set_post_handshake_auth() and SSL_set_post_handshake_auth() enable the
54e71b7053SJung-uk KimPost-Handshake Authentication extension to be added to the ClientHello such that
55e71b7053SJung-uk Kimpost-handshake authentication can be requested by the server. If B<val> is 0
56e71b7053SJung-uk Kimthen the extension is not sent, otherwise it is. By default the extension is not
57e71b7053SJung-uk Kimsent. A certificate callback will need to be set via
58e71b7053SJung-uk KimSSL_CTX_set_client_cert_cb() if no certificate is provided at initialization.
59e71b7053SJung-uk Kim
60e71b7053SJung-uk KimSSL_verify_client_post_handshake() causes a CertificateRequest message to be
61e71b7053SJung-uk Kimsent by a server on the given B<ssl> connection. The SSL_VERIFY_PEER flag must
62e71b7053SJung-uk Kimbe set; the SSL_VERIFY_POST_HANDSHAKE flag is optional.
63e71b7053SJung-uk Kim
64e71b7053SJung-uk Kim=head1 NOTES
65e71b7053SJung-uk Kim
66e71b7053SJung-uk KimThe verification of certificates can be controlled by a set of logically
67e71b7053SJung-uk Kimor'ed B<mode> flags:
68e71b7053SJung-uk Kim
69e71b7053SJung-uk Kim=over 4
70e71b7053SJung-uk Kim
71e71b7053SJung-uk Kim=item SSL_VERIFY_NONE
72e71b7053SJung-uk Kim
73e71b7053SJung-uk KimB<Server mode:> the server will not send a client certificate request to the
74e71b7053SJung-uk Kimclient, so the client will not send a certificate.
75e71b7053SJung-uk Kim
76e71b7053SJung-uk KimB<Client mode:> if not using an anonymous cipher (by default disabled), the
77e71b7053SJung-uk Kimserver will send a certificate which will be checked. The result of the
78e71b7053SJung-uk Kimcertificate verification process can be checked after the TLS/SSL handshake
79e71b7053SJung-uk Kimusing the L<SSL_get_verify_result(3)> function.
80e71b7053SJung-uk KimThe handshake will be continued regardless of the verification result.
81e71b7053SJung-uk Kim
82e71b7053SJung-uk Kim=item SSL_VERIFY_PEER
83e71b7053SJung-uk Kim
84e71b7053SJung-uk KimB<Server mode:> the server sends a client certificate request to the client.
85e71b7053SJung-uk KimThe certificate returned (if any) is checked. If the verification process
86e71b7053SJung-uk Kimfails, the TLS/SSL handshake is
87e71b7053SJung-uk Kimimmediately terminated with an alert message containing the reason for
88e71b7053SJung-uk Kimthe verification failure.
89e71b7053SJung-uk KimThe behaviour can be controlled by the additional
90e71b7053SJung-uk KimSSL_VERIFY_FAIL_IF_NO_PEER_CERT, SSL_VERIFY_CLIENT_ONCE and
91e71b7053SJung-uk KimSSL_VERIFY_POST_HANDSHAKE flags.
92e71b7053SJung-uk Kim
93e71b7053SJung-uk KimB<Client mode:> the server certificate is verified. If the verification process
94e71b7053SJung-uk Kimfails, the TLS/SSL handshake is
95e71b7053SJung-uk Kimimmediately terminated with an alert message containing the reason for
96e71b7053SJung-uk Kimthe verification failure. If no server certificate is sent, because an
97e71b7053SJung-uk Kimanonymous cipher is used, SSL_VERIFY_PEER is ignored.
98e71b7053SJung-uk Kim
99e71b7053SJung-uk Kim=item SSL_VERIFY_FAIL_IF_NO_PEER_CERT
100e71b7053SJung-uk Kim
101e71b7053SJung-uk KimB<Server mode:> if the client did not return a certificate, the TLS/SSL
102e71b7053SJung-uk Kimhandshake is immediately terminated with a "handshake failure" alert.
103e71b7053SJung-uk KimThis flag must be used together with SSL_VERIFY_PEER.
104e71b7053SJung-uk Kim
105*da327cd2SJung-uk KimB<Client mode:> ignored (see BUGS)
106e71b7053SJung-uk Kim
107e71b7053SJung-uk Kim=item SSL_VERIFY_CLIENT_ONCE
108e71b7053SJung-uk Kim
109e71b7053SJung-uk KimB<Server mode:> only request a client certificate once during the
110e71b7053SJung-uk Kimconnection. Do not ask for a client certificate again during
111e71b7053SJung-uk Kimrenegotiation or post-authentication if a certificate was requested
112e71b7053SJung-uk Kimduring the initial handshake. This flag must be used together with
113e71b7053SJung-uk KimSSL_VERIFY_PEER.
114e71b7053SJung-uk Kim
115*da327cd2SJung-uk KimB<Client mode:> ignored (see BUGS)
116e71b7053SJung-uk Kim
117e71b7053SJung-uk Kim=item SSL_VERIFY_POST_HANDSHAKE
118e71b7053SJung-uk Kim
119e71b7053SJung-uk KimB<Server mode:> the server will not send a client certificate request
120e71b7053SJung-uk Kimduring the initial handshake, but will send the request via
121e71b7053SJung-uk KimSSL_verify_client_post_handshake(). This allows the SSL_CTX or SSL
122e71b7053SJung-uk Kimto be configured for post-handshake peer verification before the
123e71b7053SJung-uk Kimhandshake occurs. This flag must be used together with
124e71b7053SJung-uk KimSSL_VERIFY_PEER. TLSv1.3 only; no effect on pre-TLSv1.3 connections.
125e71b7053SJung-uk Kim
126*da327cd2SJung-uk KimB<Client mode:> ignored (see BUGS)
127e71b7053SJung-uk Kim
128e71b7053SJung-uk Kim=back
129e71b7053SJung-uk Kim
130e71b7053SJung-uk KimIf the B<mode> is SSL_VERIFY_NONE none of the other flags may be set.
131e71b7053SJung-uk Kim
132e71b7053SJung-uk KimThe actual verification procedure is performed either using the built-in
133e71b7053SJung-uk Kimverification procedure or using another application provided verification
134e71b7053SJung-uk Kimfunction set with
135e71b7053SJung-uk KimL<SSL_CTX_set_cert_verify_callback(3)>.
136e71b7053SJung-uk KimThe following descriptions apply in the case of the built-in procedure. An
137e71b7053SJung-uk Kimapplication provided procedure also has access to the verify depth information
138e71b7053SJung-uk Kimand the verify_callback() function, but the way this information is used
139e71b7053SJung-uk Kimmay be different.
140e71b7053SJung-uk Kim
141e71b7053SJung-uk KimSSL_CTX_set_verify_depth() and SSL_set_verify_depth() set a limit on the
142e71b7053SJung-uk Kimnumber of certificates between the end-entity and trust-anchor certificates.
143e71b7053SJung-uk KimNeither the
144e71b7053SJung-uk Kimend-entity nor the trust-anchor certificates count against B<depth>. If the
145e71b7053SJung-uk Kimcertificate chain needed to reach a trusted issuer is longer than B<depth+2>,
146e71b7053SJung-uk KimX509_V_ERR_CERT_CHAIN_TOO_LONG will be issued.
147e71b7053SJung-uk KimThe depth count is "level 0:peer certificate", "level 1: CA certificate",
148e71b7053SJung-uk Kim"level 2: higher level CA certificate", and so on. Setting the maximum
149e71b7053SJung-uk Kimdepth to 2 allows the levels 0, 1, 2 and 3 (0 being the end-entity and 3 the
150e71b7053SJung-uk Kimtrust-anchor).
151e71b7053SJung-uk KimThe default depth limit is 100,
152e71b7053SJung-uk Kimallowing for the peer certificate, at most 100 intermediate CA certificates and
153e71b7053SJung-uk Kima final trust anchor certificate.
154e71b7053SJung-uk Kim
155e71b7053SJung-uk KimThe B<verify_callback> function is used to control the behaviour when the
156e71b7053SJung-uk KimSSL_VERIFY_PEER flag is set. It must be supplied by the application and
157e71b7053SJung-uk Kimreceives two arguments: B<preverify_ok> indicates, whether the verification of
158e71b7053SJung-uk Kimthe certificate in question was passed (preverify_ok=1) or not
159e71b7053SJung-uk Kim(preverify_ok=0). B<x509_ctx> is a pointer to the complete context used
160e71b7053SJung-uk Kimfor the certificate chain verification.
161e71b7053SJung-uk Kim
162e71b7053SJung-uk KimThe certificate chain is checked starting with the deepest nesting level
163e71b7053SJung-uk Kim(the root CA certificate) and worked upward to the peer's certificate.
164e71b7053SJung-uk KimAt each level signatures and issuer attributes are checked. Whenever
165e71b7053SJung-uk Kima verification error is found, the error number is stored in B<x509_ctx>
166e71b7053SJung-uk Kimand B<verify_callback> is called with B<preverify_ok>=0. By applying
167e71b7053SJung-uk KimX509_CTX_store_* functions B<verify_callback> can locate the certificate
168e71b7053SJung-uk Kimin question and perform additional steps (see EXAMPLES). If no error is
169e71b7053SJung-uk Kimfound for a certificate, B<verify_callback> is called with B<preverify_ok>=1
170e71b7053SJung-uk Kimbefore advancing to the next level.
171e71b7053SJung-uk Kim
172e71b7053SJung-uk KimThe return value of B<verify_callback> controls the strategy of the further
173e71b7053SJung-uk Kimverification process. If B<verify_callback> returns 0, the verification
174e71b7053SJung-uk Kimprocess is immediately stopped with "verification failed" state. If
175e71b7053SJung-uk KimSSL_VERIFY_PEER is set, a verification failure alert is sent to the peer and
176e71b7053SJung-uk Kimthe TLS/SSL handshake is terminated. If B<verify_callback> returns 1,
177e71b7053SJung-uk Kimthe verification process is continued. If B<verify_callback> always returns
178e71b7053SJung-uk Kim1, the TLS/SSL handshake will not be terminated with respect to verification
179e71b7053SJung-uk Kimfailures and the connection will be established. The calling process can
180e71b7053SJung-uk Kimhowever retrieve the error code of the last verification error using
181e71b7053SJung-uk KimL<SSL_get_verify_result(3)> or by maintaining its
182e71b7053SJung-uk Kimown error storage managed by B<verify_callback>.
183e71b7053SJung-uk Kim
184e71b7053SJung-uk KimIf no B<verify_callback> is specified, the default callback will be used.
185e71b7053SJung-uk KimIts return value is identical to B<preverify_ok>, so that any verification
186e71b7053SJung-uk Kimfailure will lead to a termination of the TLS/SSL handshake with an
187e71b7053SJung-uk Kimalert message, if SSL_VERIFY_PEER is set.
188e71b7053SJung-uk Kim
189e71b7053SJung-uk KimAfter calling SSL_set_post_handshake_auth(), the client will need to add a
190e71b7053SJung-uk Kimcertificate or certificate callback to its configuration before it can
191e71b7053SJung-uk Kimsuccessfully authenticate. This must be called before SSL_connect().
192e71b7053SJung-uk Kim
193e71b7053SJung-uk KimSSL_verify_client_post_handshake() requires that verify flags have been
194e71b7053SJung-uk Kimpreviously set, and that a client sent the post-handshake authentication
195e71b7053SJung-uk Kimextension. When the client returns a certificate the verify callback will be
196e71b7053SJung-uk Kiminvoked. A write operation must take place for the Certificate Request to be
197e71b7053SJung-uk Kimsent to the client, this can be done with SSL_do_handshake() or SSL_write_ex().
198e71b7053SJung-uk KimOnly one certificate request may be outstanding at any time.
199e71b7053SJung-uk Kim
200e71b7053SJung-uk KimWhen post-handshake authentication occurs, a refreshed NewSessionTicket
201e71b7053SJung-uk Kimmessage is sent to the client.
202e71b7053SJung-uk Kim
203e71b7053SJung-uk Kim=head1 BUGS
204e71b7053SJung-uk Kim
205e71b7053SJung-uk KimIn client mode, it is not checked whether the SSL_VERIFY_PEER flag
206*da327cd2SJung-uk Kimis set, but whether any flags other than SSL_VERIFY_NONE are set. This can
207*da327cd2SJung-uk Kimlead to unexpected behaviour if SSL_VERIFY_PEER and other flags are not used as
208e71b7053SJung-uk Kimrequired.
209e71b7053SJung-uk Kim
210e71b7053SJung-uk Kim=head1 RETURN VALUES
211e71b7053SJung-uk Kim
212e71b7053SJung-uk KimThe SSL*_set_verify*() functions do not provide diagnostic information.
213e71b7053SJung-uk Kim
214e71b7053SJung-uk KimThe SSL_verify_client_post_handshake() function returns 1 if the request
215e71b7053SJung-uk Kimsucceeded, and 0 if the request failed. The error stack can be examined
216e71b7053SJung-uk Kimto determine the failure reason.
217e71b7053SJung-uk Kim
218e71b7053SJung-uk Kim=head1 EXAMPLES
219e71b7053SJung-uk Kim
220e71b7053SJung-uk KimThe following code sequence realizes an example B<verify_callback> function
221e71b7053SJung-uk Kimthat will always continue the TLS/SSL handshake regardless of verification
222e71b7053SJung-uk Kimfailure, if wished. The callback realizes a verification depth limit with
223e71b7053SJung-uk Kimmore informational output.
224e71b7053SJung-uk Kim
225e71b7053SJung-uk KimAll verification errors are printed; information about the certificate chain
226e71b7053SJung-uk Kimis printed on request.
227e71b7053SJung-uk KimThe example is realized for a server that does allow but not require client
228e71b7053SJung-uk Kimcertificates.
229e71b7053SJung-uk Kim
230e71b7053SJung-uk KimThe example makes use of the ex_data technique to store application data
231e71b7053SJung-uk Kiminto/retrieve application data from the SSL structure
232e71b7053SJung-uk Kim(see L<CRYPTO_get_ex_new_index(3)>,
233e71b7053SJung-uk KimL<SSL_get_ex_data_X509_STORE_CTX_idx(3)>).
234e71b7053SJung-uk Kim
235e71b7053SJung-uk Kim ...
236e71b7053SJung-uk Kim typedef struct {
237e71b7053SJung-uk Kim   int verbose_mode;
238e71b7053SJung-uk Kim   int verify_depth;
239e71b7053SJung-uk Kim   int always_continue;
240e71b7053SJung-uk Kim } mydata_t;
241e71b7053SJung-uk Kim int mydata_index;
242e71b7053SJung-uk Kim
243e71b7053SJung-uk Kim ...
244e71b7053SJung-uk Kim static int verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
245e71b7053SJung-uk Kim {
246e71b7053SJung-uk Kim     char    buf[256];
247e71b7053SJung-uk Kim     X509   *err_cert;
248e71b7053SJung-uk Kim     int     err, depth;
249e71b7053SJung-uk Kim     SSL    *ssl;
250e71b7053SJung-uk Kim     mydata_t *mydata;
251e71b7053SJung-uk Kim
252e71b7053SJung-uk Kim     err_cert = X509_STORE_CTX_get_current_cert(ctx);
253e71b7053SJung-uk Kim     err = X509_STORE_CTX_get_error(ctx);
254e71b7053SJung-uk Kim     depth = X509_STORE_CTX_get_error_depth(ctx);
255e71b7053SJung-uk Kim
256e71b7053SJung-uk Kim     /*
257e71b7053SJung-uk Kim      * Retrieve the pointer to the SSL of the connection currently treated
258e71b7053SJung-uk Kim      * and the application specific data stored into the SSL object.
259e71b7053SJung-uk Kim      */
260e71b7053SJung-uk Kim     ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
261e71b7053SJung-uk Kim     mydata = SSL_get_ex_data(ssl, mydata_index);
262e71b7053SJung-uk Kim
263e71b7053SJung-uk Kim     X509_NAME_oneline(X509_get_subject_name(err_cert), buf, 256);
264e71b7053SJung-uk Kim
265e71b7053SJung-uk Kim     /*
266e71b7053SJung-uk Kim      * Catch a too long certificate chain. The depth limit set using
267e71b7053SJung-uk Kim      * SSL_CTX_set_verify_depth() is by purpose set to "limit+1" so
268e71b7053SJung-uk Kim      * that whenever the "depth>verify_depth" condition is met, we
269e71b7053SJung-uk Kim      * have violated the limit and want to log this error condition.
270e71b7053SJung-uk Kim      * We must do it here, because the CHAIN_TOO_LONG error would not
271e71b7053SJung-uk Kim      * be found explicitly; only errors introduced by cutting off the
272e71b7053SJung-uk Kim      * additional certificates would be logged.
273e71b7053SJung-uk Kim      */
274e71b7053SJung-uk Kim     if (depth > mydata->verify_depth) {
275e71b7053SJung-uk Kim         preverify_ok = 0;
276e71b7053SJung-uk Kim         err = X509_V_ERR_CERT_CHAIN_TOO_LONG;
277e71b7053SJung-uk Kim         X509_STORE_CTX_set_error(ctx, err);
278e71b7053SJung-uk Kim     }
279e71b7053SJung-uk Kim     if (!preverify_ok) {
280e71b7053SJung-uk Kim         printf("verify error:num=%d:%s:depth=%d:%s\n", err,
281e71b7053SJung-uk Kim                X509_verify_cert_error_string(err), depth, buf);
282e71b7053SJung-uk Kim     } else if (mydata->verbose_mode) {
283e71b7053SJung-uk Kim         printf("depth=%d:%s\n", depth, buf);
284e71b7053SJung-uk Kim     }
285e71b7053SJung-uk Kim
286e71b7053SJung-uk Kim     /*
287e71b7053SJung-uk Kim      * At this point, err contains the last verification error. We can use
288e71b7053SJung-uk Kim      * it for something special
289e71b7053SJung-uk Kim      */
290e71b7053SJung-uk Kim     if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT)) {
291e71b7053SJung-uk Kim         X509_NAME_oneline(X509_get_issuer_name(err_cert), buf, 256);
292e71b7053SJung-uk Kim         printf("issuer= %s\n", buf);
293e71b7053SJung-uk Kim     }
294e71b7053SJung-uk Kim
295e71b7053SJung-uk Kim     if (mydata->always_continue)
296e71b7053SJung-uk Kim         return 1;
297e71b7053SJung-uk Kim     else
298e71b7053SJung-uk Kim         return preverify_ok;
299e71b7053SJung-uk Kim }
300e71b7053SJung-uk Kim ...
301e71b7053SJung-uk Kim
302e71b7053SJung-uk Kim mydata_t mydata;
303e71b7053SJung-uk Kim
304e71b7053SJung-uk Kim ...
305e71b7053SJung-uk Kim mydata_index = SSL_get_ex_new_index(0, "mydata index", NULL, NULL, NULL);
306e71b7053SJung-uk Kim
307e71b7053SJung-uk Kim ...
308e71b7053SJung-uk Kim SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE,
309e71b7053SJung-uk Kim                    verify_callback);
310e71b7053SJung-uk Kim
311e71b7053SJung-uk Kim /*
312e71b7053SJung-uk Kim  * Let the verify_callback catch the verify_depth error so that we get
313e71b7053SJung-uk Kim  * an appropriate error in the logfile.
314e71b7053SJung-uk Kim  */
315e71b7053SJung-uk Kim SSL_CTX_set_verify_depth(verify_depth + 1);
316e71b7053SJung-uk Kim
317e71b7053SJung-uk Kim /*
318e71b7053SJung-uk Kim  * Set up the SSL specific data into "mydata" and store it into th SSL
319e71b7053SJung-uk Kim  * structure.
320e71b7053SJung-uk Kim  */
321e71b7053SJung-uk Kim mydata.verify_depth = verify_depth; ...
322e71b7053SJung-uk Kim SSL_set_ex_data(ssl, mydata_index, &mydata);
323e71b7053SJung-uk Kim
324e71b7053SJung-uk Kim ...
325e71b7053SJung-uk Kim SSL_accept(ssl);       /* check of success left out for clarity */
326e71b7053SJung-uk Kim if (peer = SSL_get_peer_certificate(ssl)) {
327e71b7053SJung-uk Kim     if (SSL_get_verify_result(ssl) == X509_V_OK) {
328e71b7053SJung-uk Kim         /* The client sent a certificate which verified OK */
329e71b7053SJung-uk Kim     }
330e71b7053SJung-uk Kim }
331e71b7053SJung-uk Kim
332e71b7053SJung-uk Kim=head1 SEE ALSO
333e71b7053SJung-uk Kim
334e71b7053SJung-uk KimL<ssl(7)>, L<SSL_new(3)>,
335e71b7053SJung-uk KimL<SSL_CTX_get_verify_mode(3)>,
336e71b7053SJung-uk KimL<SSL_get_verify_result(3)>,
337e71b7053SJung-uk KimL<SSL_CTX_load_verify_locations(3)>,
338e71b7053SJung-uk KimL<SSL_get_peer_certificate(3)>,
339e71b7053SJung-uk KimL<SSL_CTX_set_cert_verify_callback(3)>,
340e71b7053SJung-uk KimL<SSL_get_ex_data_X509_STORE_CTX_idx(3)>,
341e71b7053SJung-uk KimL<SSL_CTX_set_client_cert_cb(3)>,
342e71b7053SJung-uk KimL<CRYPTO_get_ex_new_index(3)>
343e71b7053SJung-uk Kim
344e71b7053SJung-uk Kim=head1 HISTORY
345e71b7053SJung-uk Kim
346e71b7053SJung-uk KimThe SSL_VERIFY_POST_HANDSHAKE option, and the SSL_verify_client_post_handshake()
347e71b7053SJung-uk Kimand SSL_set_post_handshake_auth() functions were added in OpenSSL 1.1.1.
348e71b7053SJung-uk Kim
349e71b7053SJung-uk Kim=head1 COPYRIGHT
350e71b7053SJung-uk Kim
351*da327cd2SJung-uk KimCopyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
352e71b7053SJung-uk Kim
353e71b7053SJung-uk KimLicensed under the OpenSSL license (the "License").  You may not use
354e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
355e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
356e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
357e71b7053SJung-uk Kim
358e71b7053SJung-uk Kim=cut
359