diff --git a/src/gui/src/Fingerprint.cpp b/src/gui/src/Fingerprint.cpp index 6412dcea..b2816684 100644 --- a/src/gui/src/Fingerprint.cpp +++ b/src/gui/src/Fingerprint.cpp @@ -22,10 +22,10 @@ #include #include -static const char kDirName[] = "ssl/fingerprints"; -static const char kLocalFilename[] = "local.txt"; -static const char kTrustedServersFilename[] = "trusted-servers.txt"; -static const char kTrustedClientsFilename[] = "trusted-clients.txt"; +static const char kDirName[] = "SSL/Fingerprints"; +static const char kLocalFilename[] = "Local.txt"; +static const char kTrustedServersFilename[] = "TrustedServers.txt"; +static const char kTrustedClientsFilename[] = "TrustedClients.txt"; Fingerprint::Fingerprint(const QString& filename) { diff --git a/src/gui/src/PluginManager.cpp b/src/gui/src/PluginManager.cpp index 8781fe7c..f3883be7 100644 --- a/src/gui/src/PluginManager.cpp +++ b/src/gui/src/PluginManager.cpp @@ -40,6 +40,7 @@ static const char kLinuxProcessorArchRpm64[] = "Linux-x86_64-rpm"; static QString kCertificateLifetime = "365"; static QString kCertificateSubjectInfo = "/CN=Synergy"; static QString kCertificateFilename = "Synergy.pem"; +static QString kSslDir = "SSL"; static QString kUnixOpenSslCommand = "openssl"; #if defined(Q_OS_WIN) @@ -151,10 +152,23 @@ void PluginManager::generateCertificate() arguments.append("-newkey"); arguments.append("rsa:1024"); + QString sslDirPath = QString("%1%2%3") + .arg(m_ProfileDir) + .arg(QDir::separator()) + .arg(kSslDir); + + QDir sslDir(sslDirPath); + if (!sslDir.exists()) { + sslDir.mkdir("."); + } + + QString filename = QString("%1%2%3") + .arg(sslDirPath) + .arg(QDir::separator()) + .arg(kCertificateFilename); + // key output filename arguments.append("-keyout"); - QString filename = m_ProfileDir; - filename.append(QDir::separator()).append(kCertificateFilename); arguments.append(filename); // certificate output filename