Fixed ns plugin using old certificate path #4525

This commit is contained in:
Nick Bolton 2015-04-20 19:08:03 +01:00
parent f997aea8e7
commit a894615ca7
1 changed files with 6 additions and 8 deletions

View File

@ -23,6 +23,7 @@
#include "net/TSocketMultiplexerMethodJob.h"
#include "arch/XArch.h"
static const char s_certificateDir[] = { "SSL" };
static const char s_certificateFilename[] = { "Synergy.pem" };
//
@ -60,14 +61,11 @@ SecureListenSocket::accept()
setListeningJob();
}
// TODO: customized certificate path
String certificateFilename = ARCH->getProfileDirectory();
#if SYSAPI_WIN32
certificateFilename.append("\\");
#elif SYSAPI_UNIX
certificateFilename.append("/");
#endif
certificateFilename.append(s_certificateFilename);
String certificateFilename = synergy::string::sprintf(
"%s/%s/%s",
ARCH->getProfileDirectory().c_str(),
s_certificateDir,
s_certificateFilename);
bool loaded = socket->loadCertificates(certificateFilename);
if (!loaded) {