From 48591f2fde7dbc9c81482bde79243c6ef8dcab43 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 23 Oct 2025 11:53:08 +0100 Subject: Set the groups on the client context as well as the server one. --- src/modules/extra/m_ssl_openssl.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/modules') diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index adb1fce34..9d0591778 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -62,8 +62,6 @@ # define INSPIRCD_OPENSSL_AUTO_DH #endif -#define INSPIRCD_OPENSSL_DEFAULT_GROUPS "X25519MLKEM768:X25519:prime256v1"; - static bool SelfSigned = false; static int exdataindex; static Module* thismod; @@ -426,15 +424,19 @@ namespace OpenSSL } } - std::string grouplist = INSPIRCD_OPENSSL_DEFAULT_GROUPS; + std::string grouplist = "X25519MLKEM768:X25519:prime256v1"; auto strictgroups = tag->readString("groups", grouplist); if (!strictgroups) strictgroups = tag->readString("ecdhcurve", grouplist); - if (!grouplist.empty() && !ctx.SetGroups(grouplist, tag->getBool("strictgroups", strictgroups))) + if (!grouplist.empty()) { - ERR_print_errors_cb(error_callback, this); - throw Exception("Couldn't set groups: " + lasterr); + strictgroups = tag->getBool("strictgroups", strictgroups); + if (!ctx.SetGroups(grouplist, strictgroups) || !clientctx.SetGroups(grouplist, strictgroups)) + { + ERR_print_errors_cb(error_callback, this); + throw Exception("Couldn't set groups: " + lasterr); + } } SetContextOptions("server", tag, ctx); -- cgit v1.3.1-10-gc9f91