]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_ssl_mbedtls.cpp
Deduplicate code for handling with setting LDAP options.
[user/henk/code/inspircd.git] / src / modules / extra / m_ssl_mbedtls.cpp
index 8c15342f22820ceedaa95a66a61f76c0c03b418e..c4c1906a1ebba968189c2728c7665c46db1b3d08 100644 (file)
@@ -18,6 +18,7 @@
 
 /// $LinkerFlags: -lmbedtls
 
+/// $PackageInfo: require_system("arch") mbedtls
 /// $PackageInfo: require_system("darwin") mbedtls
 /// $PackageInfo: require_system("debian" "9.0") libmbedtls-dev
 /// $PackageInfo: require_system("ubuntu" "16.04") libmbedtls-dev
@@ -410,12 +411,12 @@ namespace mbedTLS
                                , dhstr(ReadFile(tag->getString("dhfile", "dhparams.pem")))
                                , ciphersuitestr(tag->getString("ciphersuites"))
                                , curvestr(tag->getString("curves"))
-                               , mindh(tag->getInt("mindhbits", 2048))
+                               , mindh(tag->getUInt("mindhbits", 2048))
                                , hashstr(tag->getString("hash", "sha256"))
                                , castr(tag->getString("cafile"))
-                               , minver(tag->getInt("minver"))
-                               , maxver(tag->getInt("maxver"))
-                               , outrecsize(tag->getInt("outrecsize", 2048, 512, 16384))
+                               , minver(tag->getUInt("minver", 0))
+                               , maxver(tag->getUInt("maxver", 0))
+                               , outrecsize(tag->getUInt("outrecsize", 2048, 512, 16384))
                                , requestclientcert(tag->getBool("requestclientcert", true))
                        {
                                if (!castr.empty())
@@ -876,7 +877,7 @@ class ModuleSSLmbedTLS : public Module
                for (ConfigIter i = tags.first; i != tags.second; ++i)
                {
                        ConfigTag* tag = i->second;
-                       if (tag->getString("provider") != "mbedtls")
+                       if (!stdalgo::string::equalsci(tag->getString("provider"), "mbedtls"))
                                continue;
 
                        std::string name = tag->getString("name");