]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Rename `<bind:ssl>` to `<bind:sslprofile>`.
authorSadie Powell <sadie@witchery.services>
Wed, 10 Mar 2021 03:43:56 +0000 (03:43 +0000)
committerSadie Powell <sadie@witchery.services>
Wed, 10 Mar 2021 04:23:11 +0000 (04:23 +0000)
docs/conf/inspircd.conf.example
docs/conf/links.conf.example
docs/conf/modules.conf.example
src/coremods/core_stats.cpp
src/listensocket.cpp
src/modules/m_flashpolicyd.cpp
src/modules/m_ircv3_sts.cpp
src/usermanager.cpp

index cdfb6f3c285d880f2d246a4efba73e5e0b3671db..f07f21cdd0e4121a1a6a45393dcec45c6e058a03 100644 (file)
       # to this bind section.
       type="clients"
 
-      # ssl: If you want the port(s) in this bind tag to use TLS (SSL), set this
+      # sslprofile: If you want the port(s) in this bind tag to use TLS (SSL), set this
       # to the name of a custom <sslprofile> tag that you have defined. See the
       # docs page for the TLS (SSL) module you are using for more details:
       #
       #
       # You will need to load the ssl_openssl module for OpenSSL, ssl_gnutls
       # for GnuTLS and ssl_mbedtls for mbedTLS.
-      ssl="Clients"
+      sslprofile="Clients"
 
       # defer: When this is non-zero, connections will not be handed over to
       # the daemon from the operating system before data is ready.
index 7ced7170ec669f744e68ee94e07a4ac26f331942..19d770d3530a3368fb64f7db3fd681657f6b9003 100644 (file)
@@ -10,7 +10,7 @@
 <bind address="1.2.3.4"
       port="7005"
       type="servers"
-      ssl="Servers">
+      sslprofile="Servers">
 
 # Plaintext listener that binds on a TCP/IP endpoint:
 <bind address=""
       port="7000"
       allowmask="203.0.113.0/24 127.0.0.0/8 2001:db8::/32"
       timeout="5m"
-      ssl="Servers"
+      sslprofile="Servers"
       bind="1.2.3.4"
       statshidden="no"
       hidden="no"
index d236d6cb9804b37463340ef5caf3d4df3fc0e5f6..0b149775bc480cc9d422f77ac8f7d15995233262 100644 (file)
 # a <bind> tag with type "httpd", and load at least one of the other
 # httpd_* modules to provide pages to display.
 # <bind address="127.0.0.1" port="8067" type="httpd">
-# <bind address="127.0.0.1" port="8097" type="httpd" ssl="gnutls">
+# <bind address="127.0.0.1" port="8097" type="httpd" sslprofile="Clients">
 #
 # You can adjust the timeout for HTTP connections below. All HTTP
 # connections will be closed after (roughly) this time period.
index d6703872e7aaede3e82af64a2471223db2469ec4..19e429a95e92089924cc590e47ea39f69b791116 100644 (file)
@@ -126,7 +126,7 @@ void CommandStats::DoStats(Stats::Context& stats)
                                if (!hook.empty())
                                        portentry << ", hook: " << hook;
 
-                               const std::string sslprofile = ls->bind_tag->getString("ssl");
+                               const std::string sslprofile = ls->bind_tag->getString("sslprofile", ls->bind_tag->getString("ssl"));
                                if (!sslprofile.empty())
                                        portentry << ", ssl profile: " << sslprofile;
 
index 844a1a9c6a5f42f477dd1d85ec478fa1487a13bf..f14db773a2675a40cd970f28e23476d5653fcd07 100644 (file)
@@ -97,7 +97,8 @@ ListenSocket::ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_t
        }
 
        // Default defer to on for TLS listeners because in TLS the client always speaks first
-       int timeout = tag->getDuration("defer", (tag->getString("ssl").empty() ? 0 : 3));
+       unsigned int timeoutdef = tag->getString("sslprofile", tag->getString("ssl")).empty() ? 0 : 3;
+       int timeout = tag->getDuration("defer", timeoutdef, 0, 60);
        if (timeout && !rv)
        {
 #if defined TCP_DEFER_ACCEPT
@@ -240,7 +241,7 @@ void ListenSocket::ResetIOHookProvider()
                        curr.SetProvider(std::string());
        }
 
-       std::string provname = bind_tag->getString("ssl");
+       std::string provname = bind_tag->getString("sslprofile",  bind_tag->getString("ssl"));
        if (!provname.empty())
                provname.insert(0, "ssl/");
 
index e65e6dace448715f77fe05eb69d88614ca0b9e22..c2a965687842e53cfde716e543cc644357459817 100644 (file)
@@ -127,7 +127,7 @@ class ModuleFlashPD : public Module
                                if (!stdalgo::string::equalsci(ls->bind_tag->getString("type", "clients", 1), "clients"))
                                        continue;
 
-                               if (!ls->bind_tag->getString("ssl").empty())
+                               if (!ls->bind_tag->getString("sslprofile", ls->bind_tag->getString("ssl")).empty())
                                        continue;
 
                                to_ports.append(ConvToStr(ls->bind_sa.port())).push_back(',');
index c75da3fc0924c96e7f07938aae5af2569b6f41b7..9b9d625f6727c73f14e26b00d3f5a9cacc3ed6fa 100644 (file)
@@ -142,7 +142,7 @@ class ModuleIRCv3STS : public Module
                                continue;
 
                        // Is this listener using TLS (SSL)?
-                       if (ls->bind_tag->getString("ssl").empty())
+                       if (ls->bind_tag->getString("sslprofile", ls->bind_tag->getString("ssl")).empty())
                                continue;
 
                        // TODO: Add a way to check if a listener's TLS cert is CA-verified.
index a96851c933709014ded83eb243317dfe49d9e6b5..c7aaa5c1134e54c9240c1ff0557bfa2112cd8d0c 100644 (file)
@@ -161,7 +161,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
                        {
                                ServerInstance->Logs->Log("USERS", LOG_DEBUG, "Non-existent I/O hook '%s' in <bind:%s> tag at %s",
                                        iohookprovref.GetProvider().c_str(),
-                                       i == via->iohookprovs.begin() ? "hook" : "ssl",
+                                       i == via->iohookprovs.begin() ? "hook" : "sslprofile",
                                        via->bind_tag->getTagLocation().c_str());
                                this->QuitUser(New, "Internal error handling connection");
                                return;