summaryrefslogtreecommitdiff
path: root/src/lib/libtls/tls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libtls/tls.c')
-rw-r--r--src/lib/libtls/tls.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c
index 46ed8180d1..1931f4838a 100644
--- a/src/lib/libtls/tls.c
+++ b/src/lib/libtls/tls.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls.c,v 1.83 2019/04/01 15:58:02 jsing Exp $ */ 1/* $OpenBSD: tls.c,v 1.84 2020/01/20 08:39:21 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -414,6 +414,7 @@ tls_configure_ssl(struct tls *ctx, SSL_CTX *ssl_ctx)
414 SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TLSv1); 414 SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TLSv1);
415 SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TLSv1_1); 415 SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TLSv1_1);
416 SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TLSv1_2); 416 SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TLSv1_2);
417 SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TLSv1_3);
417 418
418 if ((ctx->config->protocols & TLS_PROTOCOL_TLSv1_0) == 0) 419 if ((ctx->config->protocols & TLS_PROTOCOL_TLSv1_0) == 0)
419 SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1); 420 SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1);
@@ -421,6 +422,8 @@ tls_configure_ssl(struct tls *ctx, SSL_CTX *ssl_ctx)
421 SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1_1); 422 SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1_1);
422 if ((ctx->config->protocols & TLS_PROTOCOL_TLSv1_2) == 0) 423 if ((ctx->config->protocols & TLS_PROTOCOL_TLSv1_2) == 0)
423 SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1_2); 424 SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1_2);
425 if ((ctx->config->protocols & TLS_PROTOCOL_TLSv1_3) == 0)
426 SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TLSv1_3);
424 427
425 if (ctx->config->alpn != NULL) { 428 if (ctx->config->alpn != NULL) {
426 if (SSL_CTX_set_alpn_protos(ssl_ctx, ctx->config->alpn, 429 if (SSL_CTX_set_alpn_protos(ssl_ctx, ctx->config->alpn,