summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_seclevel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_seclevel.c')
-rw-r--r--src/lib/libssl/ssl_seclevel.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_seclevel.c b/src/lib/libssl/ssl_seclevel.c
index 34cea637e0..e0d7a631cb 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.6 2022/06/29 08:27:51 tb Exp $ */ 1/* $OpenBSD: ssl_seclevel.c,v 1.7 2022/06/29 08:30:04 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2020 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2020 Theo Buehler <tb@openbsd.org>
4 * 4 *
@@ -228,6 +228,16 @@ ssl_security(const SSL *ssl, int op, int bits, int nid, void *other)
228} 228}
229 229
230int 230int
231ssl_ctx_security_dh(const SSL_CTX *ctx, DH *dh)
232{
233#if defined(LIBRESSL_HAS_SECURITY_LEVEL)
234 return ssl_ctx_security(ctx, SSL_SECOP_TMP_DH, DH_security_bits(dh), 0,
235 dh);
236#else
237 return 1;
238#endif
239}
240int
231ssl_security_dh(const SSL *ssl, DH *dh) 241ssl_security_dh(const SSL *ssl, DH *dh)
232{ 242{
233#if defined(LIBRESSL_HAS_SECURITY_LEVEL) 243#if defined(LIBRESSL_HAS_SECURITY_LEVEL)