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