#5627 Automatically generate SSL cert when enabling SSL

This commit is contained in:
Andrew Nelless 2016-10-03 15:26:27 +01:00 committed by Andrew Nelless
parent 32f143f52b
commit d1a180f652
1 changed files with 9 additions and 0 deletions

View File

@ -24,6 +24,8 @@
#include "QUtility.h"
#include "AppConfig.h"
#include "EditionType.h"
#include "SslCertificate.h"
#include "MainWindow.h"
#include <QtCore>
#include <QtGui>
@ -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<MainWindow&> (*this->parent());
mainWindow.updateLocalFingerprint();
}
}