]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_ssl_openssl.cpp
Improvements to the hostchange module.
[user/henk/code/inspircd.git] / src / modules / extra / m_ssl_openssl.cpp
index 828fcc26a07332e7e39c3b224582659533b38ca3..5f61c71a9accbd4802fbc8d77c9c86b595dc1297 100644 (file)
@@ -222,11 +222,11 @@ namespace OpenSSL
 
                        /* Set CRL mode */
                        unsigned long crlflags = X509_V_FLAG_CRL_CHECK;
-                       if (crlmode == "chain")
+                       if (stdalgo::string::equalsci(crlmode, "chain"))
                        {
                                crlflags |= X509_V_FLAG_CRL_CHECK_ALL;
                        }
-                       else if (crlmode != "leaf")
+                       else if (!stdalgo::string::equalsci(crlmode, "leaf"))
                        {
                                throw ModuleException("Unknown mode '" + crlmode + "'; expected either 'chain' (default) or 'leaf'");
                        }
@@ -359,7 +359,7 @@ namespace OpenSSL
                        , ctx(SSL_CTX_new(SSLv23_server_method()))
                        , clictx(SSL_CTX_new(SSLv23_client_method()))
                        , allowrenego(tag->getBool("renegotiation")) // Disallow by default
-                       , outrecsize(tag->getInt("outrecsize", 2048, 512, 16384))
+                       , outrecsize(tag->getUInt("outrecsize", 2048, 512, 16384))
                {
                        if ((!ctx.SetDH(dh)) || (!clictx.SetDH(dh)))
                                throw Exception("Couldn't set DH parameters");
@@ -963,7 +963,7 @@ class ModuleSSLOpenSSL : public Module
                for (ConfigIter i = tags.first; i != tags.second; ++i)
                {
                        ConfigTag* tag = i->second;
-                       if (tag->getString("provider") != "openssl")
+                       if (!stdalgo::string::equalsci(tag->getString("provider"), "openssl"))
                                continue;
 
                        std::string name = tag->getString("name");