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