From d1a180f652158dc1e91cd0d9f41f7bdd5cad9d1b Mon Sep 17 00:00:00 2001 From: Andrew Nelless Date: Mon, 3 Oct 2016 15:26:27 +0100 Subject: [PATCH] #5627 Automatically generate SSL cert when enabling SSL --- src/gui/src/SettingsDialog.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/src/SettingsDialog.cpp b/src/gui/src/SettingsDialog.cpp index e6bec0fa..813eac36 100644 --- a/src/gui/src/SettingsDialog.cpp +++ b/src/gui/src/SettingsDialog.cpp @@ -24,6 +24,8 @@ #include "QUtility.h" #include "AppConfig.h" #include "EditionType.h" +#include "SslCertificate.h" +#include "MainWindow.h" #include #include @@ -143,4 +145,11 @@ void SettingsDialog::on_m_pComboLanguage_currentIndexChanged(int index) void SettingsDialog::on_m_pCheckBoxEnableCrypto_toggled(bool checked) { m_AppConfig.setCryptoEnabled(checked); + m_AppConfig.saveSettings(); + if (checked) { + SslCertificate sslCertificate; + sslCertificate.generateCertificate(); + MainWindow& mainWindow = dynamic_cast (*this->parent()); + mainWindow.updateLocalFingerprint(); + } }