Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40)

Standard preamble:
========================================================================
..
..
.. Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. \*(C+ will
give a nicer C++. Capital omega is used to do unbreakable dashes and
therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
nothing in troff, for use with C<>.
.tr \(*W- . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.

If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.

Avoid warning from groff about undefined register 'F'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF
Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ========================================================================

Title "SSL_CTX_SET_CT_VALIDATION_CALLBACK 3"
SSL_CTX_SET_CT_VALIDATION_CALLBACK 3 "2023-05-30" "1.1.1u" "OpenSSL"
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.
"NAME"
ssl_ct_validation_cb, SSL_enable_ct, SSL_CTX_enable_ct, SSL_disable_ct, SSL_CTX_disable_ct, SSL_set_ct_validation_callback, SSL_CTX_set_ct_validation_callback, SSL_ct_is_enabled, SSL_CTX_ct_is_enabled - control Certificate Transparency policy
"SYNOPSIS"
Header "SYNOPSIS" .Vb 1 #include <openssl/ssl.h> \& typedef int (*ssl_ct_validation_cb)(const CT_POLICY_EVAL_CTX *ctx, const STACK_OF(SCT) *scts, void *arg); \& int SSL_enable_ct(SSL *s, int validation_mode); int SSL_CTX_enable_ct(SSL_CTX *ctx, int validation_mode); int SSL_set_ct_validation_callback(SSL *s, ssl_ct_validation_cb callback, void *arg); int SSL_CTX_set_ct_validation_callback(SSL_CTX *ctx, ssl_ct_validation_cb callback, void *arg); void SSL_disable_ct(SSL *s); void SSL_CTX_disable_ct(SSL_CTX *ctx); int SSL_ct_is_enabled(const SSL *s); int SSL_CTX_ct_is_enabled(const SSL_CTX *ctx); .Ve
"DESCRIPTION"
Header "DESCRIPTION" \fBSSL_enable_ct() and SSL_CTX_enable_ct() enable the processing of signed certificate timestamps (SCTs) either for a given \s-1SSL\s0 connection or for all connections that share the given \s-1SSL\s0 context, respectively. This is accomplished by setting a built-in \s-1CT\s0 validation callback. The behaviour of the callback is determined by the validation_mode argument, which can be either of \s-1SSL_CT_VALIDATION_PERMISSIVE\s0 or \fB\s-1SSL_CT_VALIDATION_STRICT\s0 as described below.

If validation_mode is equal to \s-1SSL_CT_VALIDATION_STRICT\s0, then in a full \s-1TLS\s0 handshake with the verification mode set to \s-1SSL_VERIFY_PEER\s0, if the peer presents no valid SCTs the handshake will be aborted. If the verification mode is \s-1SSL_VERIFY_NONE\s0, the handshake will continue despite lack of valid SCTs. However, in that case if the verification status before the built-in callback was X509_V_OK it will be set to X509_V_ERR_NO_VALID_SCTS after the callback. Applications can call SSL_get_verify_result\|(3) to check the status at handshake completion, even after session resumption since the verification status is part of the saved session state. See SSL_set_verify\|(3), <SSL_get_verify_result\|(3)>, SSL_session_reused\|(3).

If validation_mode is equal to \s-1SSL_CT_VALIDATION_PERMISSIVE\s0, then the handshake continues, and the verification status is not modified, regardless of the validation status of any SCTs. The application can still inspect the validation status of the SCTs at handshake completion. Note that with session resumption there will not be any SCTs presented during the handshake. Therefore, in applications that delay \s-1SCT\s0 policy enforcement until after handshake completion, such delayed \s-1SCT\s0 checks should only be performed when the session is not resumed.

\fBSSL_set_ct_validation_callback() and SSL_CTX_set_ct_validation_callback() register a custom callback that may implement a different policy than either of the above. This callback can examine the peer's SCTs and determine whether they are sufficient to allow the connection to continue. The \s-1TLS\s0 handshake is aborted if the verification mode is not \s-1SSL_VERIFY_NONE\s0 and the callback returns a non-positive result.

An arbitrary callback context argument, arg, can be passed in when setting the callback. This will be passed to the callback whenever it is invoked. Ownership of this context remains with the caller.

If no callback is set, SCTs will not be requested and Certificate Transparency validation will not occur.

No callback will be invoked when the peer presents no certificate, e.g. by employing an anonymous (aNULL) cipher suite. In that case the handshake continues as it would had no callback been requested. Callbacks are also not invoked when the peer certificate chain is invalid or validated via \s-1DANE-TA\s0\|(2) or \s-1DANE-EE\s0\|(3) \s-1TLSA\s0 records which use a private X.509 \s-1PKI,\s0 or no X.509 \s-1PKI\s0 at all, respectively. Clients that require SCTs are expected to not have enabled any aNULL ciphers nor to have specified server verification via \s-1DANE-TA\s0\|(2) or \s-1DANE-EE\s0\|(3) \s-1TLSA\s0 records.

\fBSSL_disable_ct() and SSL_CTX_disable_ct() turn off \s-1CT\s0 processing, whether enabled via the built-in or the custom callbacks, by setting a \s-1NULL\s0 callback. These may be implemented as macros.

\fBSSL_ct_is_enabled() and SSL_CTX_ct_is_enabled() return 1 if \s-1CT\s0 processing is enabled via either SSL_enable_ct() or a non-null custom callback, and 0 otherwise.

"NOTES"
Header "NOTES" When \s-1SCT\s0 processing is enabled, \s-1OCSP\s0 stapling will be enabled. This is because one possible source of SCTs is the \s-1OCSP\s0 response from a server.

The time returned by SSL_SESSION_get_time() will be used to evaluate whether any presented SCTs have timestamps that are in the future (and therefore invalid).

"RESTRICTIONS"
Header "RESTRICTIONS" Certificate Transparency validation cannot be enabled and so a callback cannot be set if a custom client extension handler has been registered to handle \s-1SCT\s0 extensions (TLSEXT_TYPE_signed_certificate_timestamp).
"RETURN VALUES"
Header "RETURN VALUES" \fBSSL_enable_ct(), SSL_CTX_enable_ct(), SSL_CTX_set_ct_validation_callback() and \fBSSL_set_ct_validation_callback() return 1 if the callback is successfully set. They return 0 if an error occurs, e.g. a custom client extension handler has been setup to handle SCTs.

\fBSSL_disable_ct() and SSL_CTX_disable_ct() do not return a result.

\fBSSL_CTX_ct_is_enabled() and SSL_ct_is_enabled() return a 1 if a non-null \s-1CT\s0 validation callback is set, or 0 if no callback (or equivalently a \s-1NULL\s0 callback) is set.

"SEE ALSO"
Header "SEE ALSO" \fBssl\|(7), <SSL_get_verify_result\|(3)>, \fBSSL_session_reused\|(3), \fBSSL_set_verify\|(3), \fBSSL_CTX_set_verify\|(3), \fBSSL_SESSION_get_time\|(3)
"COPYRIGHT"
Header "COPYRIGHT" Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use this file except in compliance with the License. You can obtain a copy in the file \s-1LICENSE\s0 in the source distribution or at <https://www.openssl.org/source/license.html>.