diff options
Diffstat (limited to 'Swift/QtUI')
| -rw-r--r-- | Swift/QtUI/QtConnectionSettings.ui | 7 | ||||
| -rw-r--r-- | Swift/QtUI/QtConnectionSettingsWindow.cpp | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/Swift/QtUI/QtConnectionSettings.ui b/Swift/QtUI/QtConnectionSettings.ui index 2dc46d1..cce60fe 100644 --- a/Swift/QtUI/QtConnectionSettings.ui +++ b/Swift/QtUI/QtConnectionSettings.ui | |||
| @@ -136,6 +136,13 @@ | |||
| 136 | </widget> | 136 | </widget> |
| 137 | </item> | 137 | </item> |
| 138 | <item> | 138 | <item> |
| 139 | <widget class="QCheckBox" name="manual_forceTLS1_0"> | ||
| 140 | <property name="text"> | ||
| 141 | <string>Limit encryption to TLS 1.0</string> | ||
| 142 | </property> | ||
| 143 | </widget> | ||
| 144 | </item> | ||
| 145 | <item> | ||
| 139 | <spacer name="verticalSpacer_2"> | 146 | <spacer name="verticalSpacer_2"> |
| 140 | <property name="orientation"> | 147 | <property name="orientation"> |
| 141 | <enum>Qt::Vertical</enum> | 148 | <enum>Qt::Vertical</enum> |
diff --git a/Swift/QtUI/QtConnectionSettingsWindow.cpp b/Swift/QtUI/QtConnectionSettingsWindow.cpp index a3598fa..7b5003a 100644 --- a/Swift/QtUI/QtConnectionSettingsWindow.cpp +++ b/Swift/QtUI/QtConnectionSettingsWindow.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2012 Isode Limited. | 2 | * Copyright (c) 2012-2015 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -67,6 +67,7 @@ QtConnectionSettingsWindow::QtConnectionSettingsWindow(const ClientOptions& opti | |||
| 67 | isDefault &= options.proxyType == defaults.proxyType; | 67 | isDefault &= options.proxyType == defaults.proxyType; |
| 68 | isDefault &= options.manualProxyHostname == defaults.manualProxyHostname; | 68 | isDefault &= options.manualProxyHostname == defaults.manualProxyHostname; |
| 69 | isDefault &= options.manualProxyPort == defaults.manualProxyPort; | 69 | isDefault &= options.manualProxyPort == defaults.manualProxyPort; |
| 70 | isDefault &= options.tlsOptions.schannelTLS1_0Workaround == defaults.tlsOptions.schannelTLS1_0Workaround; | ||
| 70 | if (isDefault) { | 71 | if (isDefault) { |
| 71 | ui.connectionMethod->setCurrentIndex(0); | 72 | ui.connectionMethod->setCurrentIndex(0); |
| 72 | } | 73 | } |
| @@ -88,6 +89,7 @@ QtConnectionSettingsWindow::QtConnectionSettingsWindow(const ClientOptions& opti | |||
| 88 | ui.manual_manualProxyHost->setText(P2QSTRING(options.manualProxyHostname)); | 89 | ui.manual_manualProxyHost->setText(P2QSTRING(options.manualProxyHostname)); |
| 89 | ui.manual_manualProxyPort->setText(P2QSTRING(boost::lexical_cast<std::string>(options.manualProxyPort))); | 90 | ui.manual_manualProxyPort->setText(P2QSTRING(boost::lexical_cast<std::string>(options.manualProxyPort))); |
| 90 | } | 91 | } |
| 92 | ui.manual_forceTLS1_0->setChecked(options.tlsOptions.schannelTLS1_0Workaround); | ||
| 91 | } | 93 | } |
| 92 | } else { | 94 | } else { |
| 93 | ui.connectionMethod->setCurrentIndex(2); | 95 | ui.connectionMethod->setCurrentIndex(2); |
| @@ -100,6 +102,9 @@ QtConnectionSettingsWindow::QtConnectionSettingsWindow(const ClientOptions& opti | |||
| 100 | } | 102 | } |
| 101 | } | 103 | } |
| 102 | } | 104 | } |
| 105 | #ifndef HAVE_SCHANNEL | ||
| 106 | ui.manual_forceTLS1_0->hide(); | ||
| 107 | #endif | ||
| 103 | } | 108 | } |
| 104 | 109 | ||
| 105 | void QtConnectionSettingsWindow::handleProxyTypeChanged(int index) { | 110 | void QtConnectionSettingsWindow::handleProxyTypeChanged(int index) { |
| @@ -129,6 +134,7 @@ ClientOptions QtConnectionSettingsWindow::getOptions() { | |||
| 129 | options.useTLS = static_cast<ClientOptions::UseTLS>(ui.manual_useTLS->currentIndex()); | 134 | options.useTLS = static_cast<ClientOptions::UseTLS>(ui.manual_useTLS->currentIndex()); |
| 130 | options.useStreamCompression = ui.manual_allowCompression->isChecked(); | 135 | options.useStreamCompression = ui.manual_allowCompression->isChecked(); |
| 131 | options.allowPLAINWithoutTLS = ui.manual_allowPLAINWithoutTLS->isChecked(); | 136 | options.allowPLAINWithoutTLS = ui.manual_allowPLAINWithoutTLS->isChecked(); |
| 137 | options.tlsOptions.schannelTLS1_0Workaround = ui.manual_forceTLS1_0->isChecked(); | ||
| 132 | if (ui.manual_manualHost->isChecked()) { | 138 | if (ui.manual_manualHost->isChecked()) { |
| 133 | options.manualHostname = Q2PSTRING(ui.manual_manualHostName->text()); | 139 | options.manualHostname = Q2PSTRING(ui.manual_manualHostName->text()); |
| 134 | try { | 140 | try { |
Swift