SYNERGY-545 TLS certificate error (#6832)
* SYNERGY-545 TLS certificate error * #6832 TLS certificate error on macOS system
This commit is contained in:
parent
b9d3ce8aa0
commit
92874037ed
5 changed files with 21 additions and 10 deletions
|
|
@ -15,6 +15,7 @@ Bug fixes:
|
|||
- #6826 + #6829 SonarCloud Critical bugs
|
||||
- #6821 Blocker bugs found by sonar in synergy and in tests
|
||||
- #6825 The system requires google test even when tests are disabled with BUILD_TESTS=OFF
|
||||
- #6832 TLS certificate error on macOS system
|
||||
|
||||
Enhancements:
|
||||
- #6750 Integrate SonarCloud for static analysis and test coverage
|
||||
|
|
|
|||
|
|
@ -418,12 +418,18 @@ void AppConfig::setCryptoEnabled(bool newValue) {
|
|||
emit sslToggled(m_CryptoEnabled);
|
||||
}
|
||||
|
||||
bool AppConfig::getCryptoEnabled() const {
|
||||
return
|
||||
bool AppConfig::isCryptoAvailable() const {
|
||||
bool result {true};
|
||||
|
||||
#ifndef SYNERGY_ENTERPRISE
|
||||
(edition() == kPro) &&
|
||||
result = (edition() == kPro || edition() == kBusiness);
|
||||
#endif
|
||||
m_CryptoEnabled;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool AppConfig::getCryptoEnabled() const {
|
||||
return isCryptoAvailable() && m_CryptoEnabled;
|
||||
}
|
||||
|
||||
void AppConfig::setAutoHide(bool b) {
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ class AppConfig: public QObject, public GUI::Config::ConfigBase
|
|||
void persistLogDir();
|
||||
ElevateMode elevateMode();
|
||||
|
||||
bool isCryptoAvailable() const;
|
||||
void setCryptoEnabled(bool e);
|
||||
bool getCryptoEnabled() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -665,17 +665,22 @@ void MainWindow::startSynergy()
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
if (m_AppConfig->getCryptoEnabled()) {
|
||||
args << "--enable-crypto";
|
||||
args << "--tls-cert" << QString("\"%1\"").arg(m_AppConfig->getTLSCertPath());
|
||||
}
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
// on windows, the profile directory changes depending on the user that
|
||||
// launched the process (e.g. when launched with elevation). setting the
|
||||
// profile dir on launch ensures it uses the same profile dir is used
|
||||
// no matter how its relaunched.
|
||||
args << "--profile-dir" << getProfileRootForArg();
|
||||
|
||||
#else
|
||||
if (m_AppConfig->getCryptoEnabled()) {
|
||||
args << "--enable-crypto";
|
||||
args << "--tls-cert" << m_AppConfig->getTLSCertPath();
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((synergyType() == synergyClient && !clientArgs(args, app))
|
||||
|
|
|
|||
|
|
@ -166,7 +166,6 @@ void SettingsDialog::loadFromConfig() {
|
|||
m_pCheckBoxEnableCrypto->setChecked(m_appConfig.getCryptoEnabled());
|
||||
m_pGroupBoxTLS->setVisible(m_appConfig.getCryptoEnabled());
|
||||
|
||||
|
||||
#ifdef SYNERGY_ENTERPRISE
|
||||
|
||||
m_pCheckBoxEnableCrypto->setEnabled(true);
|
||||
|
|
@ -177,9 +176,8 @@ void SettingsDialog::loadFromConfig() {
|
|||
|
||||
#else
|
||||
|
||||
bool isPro = m_appConfig.edition() == kPro;
|
||||
m_pCheckBoxEnableCrypto->setEnabled(isPro);
|
||||
m_pLabelProUpgrade->setVisible(!isPro);
|
||||
m_pCheckBoxEnableCrypto->setEnabled(m_appConfig.isCryptoAvailable());
|
||||
m_pLabelProUpgrade->setVisible(!m_appConfig.isCryptoAvailable());
|
||||
|
||||
m_pCheckBoxAutoConfig->setChecked(appConfig().autoConfig());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue