]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_ssl_openssl.cpp
Add ConfigTag::getUInt for reading unsigned config values.
[user/henk/code/inspircd.git] / src / modules / extra / m_ssl_openssl.cpp
index 2129e5da7377c421b8554fc6f3e6c3798cfc0c46..a70bffb3c016c3d07cd7952d1ad4e149ed536e44 100644 (file)
@@ -334,8 +334,8 @@ namespace OpenSSL
                 */
                void SetContextOptions(const std::string& ctxname, ConfigTag* tag, Context& context)
                {
-                       long setoptions = tag->getInt(ctxname + "setoptions");
-                       long clearoptions = tag->getInt(ctxname + "clearoptions");
+                       long setoptions = tag->getInt(ctxname + "setoptions", 0);
+                       long clearoptions = tag->getInt(ctxname + "clearoptions", 0);
 #ifdef SSL_OP_NO_COMPRESSION
                        if (!tag->getBool("compression", false)) // Disable compression by default
                                setoptions |= SSL_OP_NO_COMPRESSION;
@@ -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");