diff --git a/AUTHORS b/AUTHORS index 63e5a13f..2036b57b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -29,3 +29,4 @@ Reed Loden Brian Campbell (bcampbell@splafinga.com) Alexey "DarthGandalf" Sokolov (http://asokolov.co.cc/) Joshua M. Clulow (http://sysmgr.org) +evaryont diff --git a/znc.cpp b/znc.cpp index b8547237..2db90f86 100644 --- a/znc.cpp +++ b/znc.cpp @@ -458,6 +458,8 @@ void CZNC::InitDirs(const CString& sArgvPath, const CString& sDataDir) { } else { m_sZNCPath = sDataDir; } + + m_sPemFile = m_sZNCPath + "/znc.pem"; } CString CZNC::GetConfPath(bool bAllowMkDir) const { @@ -533,6 +535,7 @@ bool CZNC::WriteConfig() { m_LockFile.Write("AnonIPLimit = " + CString(m_uiAnonIPLimit) + "\n"); m_LockFile.Write("MaxBufferSize= " + CString(m_uiMaxBufferSize) + "\n"); + m_LockFile.Write("SslPemFile = " + CString(m_sPemFile) + "\n"); for (size_t l = 0; l < m_vpListeners.size(); l++) { CListener* pListener = m_vpListeners[l]; @@ -1610,6 +1613,9 @@ bool CZNC::DoRehash(CString& sError) } else if (sName.Equals("MaxBufferSize")) { m_uiMaxBufferSize = sValue.ToUInt(); continue; + } else if (sName.Equals("SslPemFile")) { + m_sPemFile = sValue; + continue; } } diff --git a/znc.h b/znc.h index fda9a764..f0986ba9 100644 --- a/znc.h +++ b/znc.h @@ -101,7 +101,7 @@ public: CString GetConfPath(bool bAllowMkDir = true) const; CString GetUserPath() const; CString GetModPath() const; - CString GetPemLocation() const { return GetZNCPath() + "/znc.pem"; } + CString GetPemLocation() const { return m_sPemFile; } const CString& GetConfigFile() const { return m_sConfigFile; } bool WritePemFile(); const CString& GetISpoofFile() const { return m_sISpoofFile; } @@ -168,6 +168,7 @@ protected: CString m_sOrigISpoof; CString m_sISpoofFormat; CString m_sPidFile; + CString m_sPemFile; VCString m_vsVHosts; VCString m_vsMotd; CFile m_LockFile;