aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-04-07 10:59:28 +0100
committerGravatar Sadie Powell2025-04-07 10:59:28 +0100
commitc676f52d56a027e2f81d8fdb8efba9b07a0cf813 (patch)
treef1e9be016a510b619b5a64d4e7c88ac23d40ad16 /modules
parentAdd test vectors for PBKDF2-HMAC-SHA3 algorithms. (diff)
parentAdd the Codeberg link to the readme. (diff)
Merge branch 'insp4' into master.
Diffstat (limited to 'modules')
-rw-r--r--modules/extra/ssl_openssl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/extra/ssl_openssl.cpp b/modules/extra/ssl_openssl.cpp
index bfa8364f6..45d4a9b65 100644
--- a/modules/extra/ssl_openssl.cpp
+++ b/modules/extra/ssl_openssl.cpp
@@ -203,6 +203,11 @@ namespace OpenSSL
}
}
+ void SetSecurityLevel(int securitylevel)
+ {
+ SSL_CTX_set_security_level(ctx, securitylevel);
+ }
+
long GetDefaultContextOptions() const
{
return ctx_options;
@@ -361,6 +366,10 @@ namespace OpenSSL
SetContextOptions("server", tag, ctx);
SetContextOptions("client", tag, clientctx);
+ const auto securitylevel = tag->getNum<int>("securitylevel", 0, 0, 10);
+ if (securitylevel)
+ ctx.SetSecurityLevel(securitylevel);
+
/* Load our keys and certificates
* NOTE: OpenSSL's error logging API sucks, don't blame us for this clusterfuck.
*/