diff options
-rw-r--r-- | src/lib/libssl/ssl_seclevel.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_seclevel.c b/src/lib/libssl/ssl_seclevel.c index c3d23b2547..39b1bf341e 100644 --- a/src/lib/libssl/ssl_seclevel.c +++ b/src/lib/libssl/ssl_seclevel.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_seclevel.c,v 1.3 2022/06/28 20:49:16 tb Exp $ */ | 1 | /* $OpenBSD: ssl_seclevel.c,v 1.4 2022/06/28 20:53:32 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2020 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2020 Theo Buehler <tb@openbsd.org> |
4 | * | 4 | * |
@@ -114,8 +114,9 @@ ssl_security_secop_cipher(const SSL_CTX *ctx, const SSL *ssl, int bits, | |||
114 | if (security_level <= 2) | 114 | if (security_level <= 2) |
115 | return 1; | 115 | return 1; |
116 | 116 | ||
117 | /* XXX TLSv1.3 */ | 117 | /* Security level >= 3 requires a cipher with forward secrecy. */ |
118 | if ((cipher->algorithm_mkey & (SSL_kDHE | SSL_kECDHE)) != 0) | 118 | if ((cipher->algorithm_mkey & (SSL_kDHE | SSL_kECDHE)) == 0 && |
119 | cipher->algorithm_ssl != SSL_TLSV1_3) | ||
119 | return 0; | 120 | return 0; |
120 | 121 | ||
121 | return 1; | 122 | return 1; |