diff options
| author | 2023-09-08 17:57:50 +0100 | |
|---|---|---|
| committer | 2023-09-08 17:57:50 +0100 | |
| commit | eb90a3c53e07fb2d09399219dff7de2ce21c643d (patch) | |
| tree | c74ce6152a94cf0a749e5ad07c9bf5927467c163 /src | |
| parent | Move TokenList back to its own header and move INSP_FORMAT to compat. (diff) | |
| download | inspircd++-eb90a3c53e07fb2d09399219dff7de2ce21c643d.tar.gz inspircd++-eb90a3c53e07fb2d09399219dff7de2ce21c643d.tar.bz2 inspircd++-eb90a3c53e07fb2d09399219dff7de2ce21c643d.zip | |
Try to help users with outdated SSL module configs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 8 | ||||
| -rw-r--r-- | src/modules/extra/m_ssl_mbedtls.cpp | 8 | ||||
| -rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index c663b656b..22e02afe4 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -1190,7 +1190,15 @@ public: { const auto& tag = ServerInstance->Config->ConfValue("gnutls"); if (status.initial || tag->getBool("onrehash", true)) + { + // Try to help people who have outdated configs. + for (const auto& field : {"cafile", "certfile", "crlfile", "dhfile", "hash", "keyfile", "mindhbits", "outrecsize", "priority", "requestclientcert", "strictpriority"}) + { + if (!tag->getString(field).empty()) + throw ModuleException(this, "TLS settings have moved from <gnutls> to <sslprofile>. See " INSPIRCD_DOCS "modules/ssl_gnutls/#sslprofile for more information."); + } ReadProfiles(); + } } void OnModuleRehash(User* user, const std::string& param) override diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp index 04fc427eb..9e72cb49c 100644 --- a/src/modules/extra/m_ssl_mbedtls.cpp +++ b/src/modules/extra/m_ssl_mbedtls.cpp @@ -991,7 +991,15 @@ public: { const auto& tag = ServerInstance->Config->ConfValue("mbedtls"); if (status.initial || tag->getBool("onrehash", true)) + { + // Try to help people who have outdated configs. + for (const auto& field : {"cafile", "certfile", "ciphersuites", "crlfile", "curves", "dhfile", "hash", "keyfile", "maxver", "mindhbits", "minver", "outrecsize", "requestclientcert"}) + { + if (!tag->getString(field).empty()) + throw ModuleException(this, "TLS settings have moved from <mbedtls> to <sslprofile>. See " INSPIRCD_DOCS "modules/ssl_mbedtls/#sslprofile for more information."); + } ReadProfiles(); + } } void OnModuleRehash(User* user, const std::string& param) override diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 948c1a3e9..9f7240583 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -1043,7 +1043,15 @@ public: { const auto& tag = ServerInstance->Config->ConfValue("openssl"); if (status.initial || tag->getBool("onrehash", true)) + { + // Try to help people who have outdated configs. + for (const auto& field : {"cafile", "certfile", "ciphers", "clientclearoptions", "clientsetoptions", "compression", "crlfile", "crlmode", "crlpath", "dhfile", "ecdhcurve", "hash", "keyfile", "renegotiation", "requestclientcert", "serverclearoptions", "serversetoptions", "tlsv1", "tlsv11", "tlsv12", "tlsv13"}) + { + if (!tag->getString(field).empty()) + throw ModuleException(this, "TLS settings have moved from <openssl> to <sslprofile>. See " INSPIRCD_DOCS "modules/ssl_openssl/#sslprofile for more information."); + } ReadProfiles(); + } } void OnModuleRehash(User* user, const std::string& param) override |
