mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Added GetPemLocation()
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@82 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -94,7 +94,7 @@ int CZNC::Loop() {
|
||||
#ifdef HAVE_LIBSSL
|
||||
if (pServer->IsSSL()) {
|
||||
bSSL = true;
|
||||
pIRCSock->SetPemLocation(GetCurPath() + "/znc.pem");
|
||||
pIRCSock->SetPemLocation(GetPemLocation());
|
||||
}
|
||||
#endif
|
||||
if (!m_Manager.Connect(pServer->GetName(), pServer->GetPort(), sSockName, 20, bSSL, pUser->GetVHost(), pIRCSock)) {
|
||||
@@ -170,7 +170,7 @@ bool CZNC::Listen() {
|
||||
#ifdef HAVE_LIBSSL
|
||||
if (IsSSL()) {
|
||||
bSSL = true;
|
||||
pUserSock->SetPemLocation(GetCurPath() + "/znc.pem");
|
||||
pUserSock->SetPemLocation(GetPemLocation());
|
||||
}
|
||||
#endif
|
||||
return m_Manager.ListenAll(m_uListenPort, "_LISTENER", bSSL, SOMAXCONN, pUserSock);
|
||||
@@ -450,8 +450,8 @@ bool CZNC::ParseConfig(const string& sConfigFile) {
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((m_bSSL) && (!CFile::Exists(GetCurPath() + "/znc.pem"))) {
|
||||
cerr << "Unable to locate pem file: [" << GetCurPath() << "/znc.pem]" << endl;
|
||||
if ((m_bSSL) && (!CFile::Exists(GetPemLocation()))) {
|
||||
cerr << "Unable to locate pem file: [" << GetPemLocation() << "]" << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ public:
|
||||
const string& GetHomePath() const { if (!CFile::Exists(m_sHomePath)) { CUtils::MakeDir(m_sHomePath); } return m_sHomePath; }
|
||||
const string& GetZNCPath() const { if (!CFile::Exists(m_sZNCPath)) { CUtils::MakeDir(m_sZNCPath); } return m_sZNCPath; }
|
||||
const string& GetDataPath() const { if (!CFile::Exists(m_sDataPath)) { CUtils::MakeDir(m_sDataPath); } return m_sDataPath; }
|
||||
string GetPemLocation() const { return GetZNCPath() + "/znc.pem"; }
|
||||
|
||||
bool IsSSL() const {
|
||||
#ifdef HAVE_LIBSSL
|
||||
|
||||
Reference in New Issue
Block a user