diff options
| author | 2025-10-23 11:53:08 +0100 | |
|---|---|---|
| committer | 2025-10-23 11:54:32 +0100 | |
| commit | 48591f2fde7dbc9c81482bde79243c6ef8dcab43 (patch) | |
| tree | 30c40ba0ed6c8a1d837438d6e4094b15db827cf7 | |
| parent | Add better support for multiple TLS groups. (diff) | |
Set the groups on the client context as well as the server one.
| -rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
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); |
