X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fextra%2Fm_ssl_openssl.cpp;h=0957b5912f16c7a444b01f01e455b211b64eac84;hb=c202dea024542b9c6c6b771bb9a3a081d9eacdc5;hp=29f574fd0b0dcf6d11116c94c229c7007784dba8;hpb=d24619c012b34d5a3d4cfb93e7bea3ff3d5721e7;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 29f574fd0..0957b5912 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -48,12 +48,8 @@ # define MAX_DESCRIPTORS 10000 #endif -/* $LinkerFlags: if("USE_FREEBSD_BASE_SSL") -lssl -lcrypto */ -/* $CompileFlags: if(!"USE_FREEBSD_BASE_SSL") pkgconfversion("openssl","0.9.7") pkgconfincludes("openssl","/openssl/ssl.h","") */ -/* $LinkerFlags: if(!"USE_FREEBSD_BASE_SSL") rpath("pkg-config --libs openssl") pkgconflibs("openssl","/libssl.so","-lssl -lcrypto -ldl") */ - -/* $NoPedantic */ - +/* $CompileFlags: pkgconfversion("openssl","0.9.7") pkgconfincludes("openssl","/openssl/ssl.h","") -Wno-pedantic */ +/* $LinkerFlags: rpath("pkg-config --libs openssl") pkgconflibs("openssl","/libssl.so","-lssl -lcrypto") */ enum issl_status { ISSL_NONE, ISSL_HANDSHAKING, ISSL_OPEN }; @@ -188,7 +184,7 @@ class OpenSSLIOHook : public SSLIOHook certinfo->invalid = (SSL_get_verify_result(session->sess) != X509_V_OK); - if (SelfSigned) + if (!SelfSigned) { certinfo->unknownsigner = false; certinfo->trusted = true; @@ -506,7 +502,7 @@ class ModuleSSLOpenSSL : public Module } } - void OnRehash(User* user) CXX11_OVERRIDE + void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { sslports.clear(); @@ -554,14 +550,13 @@ class ModuleSSLOpenSSL : public Module std::string certfile; std::string cafile; std::string dhfile; - OnRehash(user); ConfigTag* conf = ServerInstance->Config->ConfValue("openssl"); - cafile = conf->getString("cafile", CONFIG_PATH "/ca.pem"); - certfile = conf->getString("certfile", CONFIG_PATH "/cert.pem"); - keyfile = conf->getString("keyfile", CONFIG_PATH "/key.pem"); - dhfile = conf->getString("dhfile", CONFIG_PATH "/dhparams.pem"); + cafile = ServerInstance->Config->Paths.PrependConfig(conf->getString("cafile", "ca.pem")); + certfile = ServerInstance->Config->Paths.PrependConfig(conf->getString("certfile", "cert.pem")); + keyfile = ServerInstance->Config->Paths.PrependConfig(conf->getString("keyfile", "key.pem")); + dhfile = ServerInstance->Config->Paths.PrependConfig(conf->getString("dhfile", "dhparams.pem")); std::string hash = conf->getString("hash", "md5"); iohook.digest = EVP_get_digestbyname(hash.c_str());