summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_seclevel.c
diff options
context:
space:
mode:
authortb <>2022-06-30 11:17:50 +0000
committertb <>2022-06-30 11:17:50 +0000
commit5f574489be242a7d86373038f340aaf574a0b228 (patch)
treefb1aefe52767d19838deec117e17af2cbf6cd936 /src/lib/libssl/ssl_seclevel.c
parent727d040aad78fde5a0f1d575255736d37d0c721c (diff)
downloadopenbsd-5f574489be242a7d86373038f340aaf574a0b228.tar.gz
openbsd-5f574489be242a7d86373038f340aaf574a0b228.tar.bz2
openbsd-5f574489be242a7d86373038f340aaf574a0b228.zip
Add checks to ensure we do not initiate or negotiate handshakes with
versions below the minimum required by the security level. input & ok jsing
Diffstat (limited to 'src/lib/libssl/ssl_seclevel.c')
-rw-r--r--src/lib/libssl/ssl_seclevel.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_seclevel.c b/src/lib/libssl/ssl_seclevel.c
index b174f57f0c..2fe6e3f222 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.11 2022/06/30 07:09:45 tb Exp $ */ 1/* $OpenBSD: ssl_seclevel.c,v 1.12 2022/06/30 11:17:49 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2020 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2020 Theo Buehler <tb@openbsd.org>
4 * 4 *
@@ -233,6 +233,12 @@ ssl_security(const SSL *ssl, int op, int bits, int nid, void *other)
233} 233}
234 234
235int 235int
236ssl_security_version(const SSL *ssl, int tls_version)
237{
238 return ssl_security(ssl, SSL_SECOP_VERSION, 0, tls_version, NULL);
239}
240
241int
236ssl_ctx_security_dh(const SSL_CTX *ctx, DH *dh) 242ssl_ctx_security_dh(const SSL_CTX *ctx, DH *dh)
237{ 243{
238#if defined(LIBRESSL_HAS_SECURITY_LEVEL) 244#if defined(LIBRESSL_HAS_SECURITY_LEVEL)