summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2022-06-28 20:53:32 +0000
committertb <>2022-06-28 20:53:32 +0000
commit78976315e28b9e4c2e12060ea0c297e2c41eca22 (patch)
tree94953aad588c19f343147636e5c97306a17a0d3e /src
parentfc45ab833d276d3dec86a490250a423b73912a25 (diff)
downloadopenbsd-78976315e28b9e4c2e12060ea0c297e2c41eca22.tar.gz
openbsd-78976315e28b9e4c2e12060ea0c297e2c41eca22.tar.bz2
openbsd-78976315e28b9e4c2e12060ea0c297e2c41eca22.zip
Security level >= 3 requires a ciphersuite with PFS
ok beck jsing sthen
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/ssl_seclevel.c7
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;