TLS: Add tls_disable_tlsv1_1 and tls_disable_tlsv1_2 phase1 params
These can be used to disable TLSv1.1 and TLSv1.2 as a workaround for AAA servers that have issues interoperating with newer TLS versions. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
parent
41ff0fa64c
commit
e9a6f18385
4 changed files with 27 additions and 0 deletions
|
@ -85,6 +85,8 @@ struct tls_config {
|
|||
#define TLS_CONN_DISABLE_SESSION_TICKET BIT(2)
|
||||
#define TLS_CONN_REQUEST_OCSP BIT(3)
|
||||
#define TLS_CONN_REQUIRE_OCSP BIT(4)
|
||||
#define TLS_CONN_DISABLE_TLSv1_1 BIT(5)
|
||||
#define TLS_CONN_DISABLE_TLSv1_2 BIT(6)
|
||||
|
||||
/**
|
||||
* struct tls_connection_params - Parameters for TLS connection
|
||||
|
|
|
@ -3177,6 +3177,19 @@ int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
|
|||
#endif /* SSL_clear_options */
|
||||
#endif /* SSL_OP_NO_TICKET */
|
||||
|
||||
#ifdef SSL_OP_NO_TLSv1_1
|
||||
if (params->flags & TLS_CONN_DISABLE_TLSv1_1)
|
||||
SSL_set_options(conn->ssl, SSL_OP_NO_TLSv1_1);
|
||||
else
|
||||
SSL_clear_options(conn->ssl, SSL_OP_NO_TLSv1_1);
|
||||
#endif /* SSL_OP_NO_TLSv1_1 */
|
||||
#ifdef SSL_OP_NO_TLSv1_2
|
||||
if (params->flags & TLS_CONN_DISABLE_TLSv1_2)
|
||||
SSL_set_options(conn->ssl, SSL_OP_NO_TLSv1_2);
|
||||
else
|
||||
SSL_clear_options(conn->ssl, SSL_OP_NO_TLSv1_2);
|
||||
#endif /* SSL_OP_NO_TLSv1_2 */
|
||||
|
||||
#ifdef HAVE_OCSP
|
||||
if (params->flags & TLS_CONN_REQUEST_OCSP) {
|
||||
SSL_CTX *ssl_ctx = tls_ctx;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue