]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Remove support for advertising the SSL ports in RPL_ISUPPORT.
authorPeter Powell <petpow@saberuk.com>
Thu, 13 Feb 2014 16:53:49 +0000 (16:53 +0000)
committerAttila Molnar <attilamolnar@hush.com>
Thu, 13 Feb 2014 17:10:40 +0000 (18:10 +0100)
- No other IRC servers implement this.
- No IRC clients I can find support this.

src/modules/extra/m_ssl_gnutls.cpp
src/modules/extra/m_ssl_openssl.cpp

index 53ed598167f5cf844448837479ec074dfdc208ea..5702ed2d566fe4878e6294b8f54f907a35664bd2 100644 (file)
@@ -986,9 +986,6 @@ class ModuleSSLGnuTLS : public Module
 
        // First member of the class, gets constructed first and destructed last
        GnuTLS::Init libinit;
-
-       std::string sslports;
-
        RandGen randhandler;
        ProfileList profiles;
 
@@ -1063,45 +1060,6 @@ class ModuleSSLGnuTLS : public Module
                ServerInstance->GenRandom = &randhandler;
        }
 
-       void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
-       {
-               sslports.clear();
-
-               ConfigTag* Conf = ServerInstance->Config->ConfValue("gnutls");
-
-               if (Conf->getBool("showports", true))
-               {
-                       sslports = Conf->getString("advertisedports");
-                       if (!sslports.empty())
-                               return;
-
-                       for (size_t i = 0; i < ServerInstance->ports.size(); i++)
-                       {
-                               ListenSocket* port = ServerInstance->ports[i];
-                               if (port->bind_tag->getString("ssl") != "gnutls")
-                                       continue;
-
-                               const std::string& portid = port->bind_desc;
-                               ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Enabling SSL for port %s", portid.c_str());
-
-                               if (port->bind_tag->getString("type", "clients") == "clients" && port->bind_addr != "127.0.0.1")
-                               {
-                                       /*
-                                        * Found an SSL port for clients that is not bound to 127.0.0.1 and handled by us, display
-                                        * the IP:port in ISUPPORT.
-                                        *
-                                        * We used to advertise all ports seperated by a ';' char that matched the above criteria,
-                                        * but this resulted in too long ISUPPORT lines if there were lots of ports to be displayed.
-                                        * To solve this by default we now only display the first IP:port found and let the user
-                                        * configure the exact value for the 005 token, if necessary.
-                                        */
-                                       sslports = portid;
-                                       break;
-                               }
-                       }
-               }
-       }
-
        void OnModuleRehash(User* user, const std::string &param) CXX11_OVERRIDE
        {
                if(param != "ssl")
@@ -1142,12 +1100,6 @@ class ModuleSSLGnuTLS : public Module
                return Version("Provides SSL support for clients", VF_VENDOR);
        }
 
-       void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
-       {
-               if (!sslports.empty())
-                       tokens["SSL"] = sslports;
-       }
-
        void OnUserConnect(LocalUser* user) CXX11_OVERRIDE
        {
                IOHook* hook = user->eh.GetIOHook();
index 53a01724be9b6924ce6d6488edce3e567a515ba8..ee024318b5ed6c1da43efab644954887422dd2c1 100644 (file)
@@ -573,7 +573,6 @@ class ModuleSSLOpenSSL : public Module
 {
        typedef std::vector<reference<OpenSSLIOHookProvider> > ProfileList;
 
-       std::string sslports;
        ProfileList profiles;
 
        void ReadProfiles()
@@ -640,45 +639,6 @@ class ModuleSSLOpenSSL : public Module
                ReadProfiles();
        }
 
-       void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
-       {
-               sslports.clear();
-
-               ConfigTag* Conf = ServerInstance->Config->ConfValue("openssl");
-
-               if (Conf->getBool("showports", true))
-               {
-                       sslports = Conf->getString("advertisedports");
-                       if (!sslports.empty())
-                               return;
-
-                       for (size_t i = 0; i < ServerInstance->ports.size(); i++)
-                       {
-                               ListenSocket* port = ServerInstance->ports[i];
-                               if (port->bind_tag->getString("ssl") != "openssl")
-                                       continue;
-
-                               const std::string& portid = port->bind_desc;
-                               ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Enabling SSL for port %s", portid.c_str());
-
-                               if (port->bind_tag->getString("type", "clients") == "clients" && port->bind_addr != "127.0.0.1")
-                               {
-                                       /*
-                                        * Found an SSL port for clients that is not bound to 127.0.0.1 and handled by us, display
-                                        * the IP:port in ISUPPORT.
-                                        *
-                                        * We used to advertise all ports seperated by a ';' char that matched the above criteria,
-                                        * but this resulted in too long ISUPPORT lines if there were lots of ports to be displayed.
-                                        * To solve this by default we now only display the first IP:port found and let the user
-                                        * configure the exact value for the 005 token, if necessary.
-                                        */
-                                       sslports = portid;
-                                       break;
-                               }
-                       }
-               }
-       }
-
        void OnModuleRehash(User* user, const std::string &param) CXX11_OVERRIDE
        {
                if (param != "ssl")
@@ -694,12 +654,6 @@ class ModuleSSLOpenSSL : public Module
                }
        }
 
-       void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
-       {
-               if (!sslports.empty())
-                       tokens["SSL"] = sslports;
-       }
-
        void OnUserConnect(LocalUser* user) CXX11_OVERRIDE
        {
                IOHook* hook = user->eh.GetIOHook();