summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtConnectionSettingsWindow.cpp')
-rw-r--r--Swift/QtUI/QtConnectionSettingsWindow.cpp8
1 files changed, 7 insertions, 1 deletions
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,8 +1,8 @@
/*
- * Copyright (c) 2012 Isode Limited.
+ * Copyright (c) 2012-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include "Swift/QtUI/QtConnectionSettingsWindow.h"
@@ -64,12 +64,13 @@ QtConnectionSettingsWindow::QtConnectionSettingsWindow(const ClientOptions& opti
isDefault &= options.useAcks == defaults.useAcks;
isDefault &= options.manualHostname == defaults.manualHostname;
isDefault &= options.manualPort == defaults.manualPort;
isDefault &= options.proxyType == defaults.proxyType;
isDefault &= options.manualProxyHostname == defaults.manualProxyHostname;
isDefault &= options.manualProxyPort == defaults.manualProxyPort;
+ isDefault &= options.tlsOptions.schannelTLS1_0Workaround == defaults.tlsOptions.schannelTLS1_0Workaround;
if (isDefault) {
ui.connectionMethod->setCurrentIndex(0);
}
else {
ui.connectionMethod->setCurrentIndex(1);
ui.manual_useTLS->setCurrentIndex(options.useTLS);
@@ -85,24 +86,28 @@ QtConnectionSettingsWindow::QtConnectionSettingsWindow(const ClientOptions& opti
ui.manual_proxyType->setCurrentIndex(options.proxyType);
if (!options.manualProxyHostname.empty()) {
ui.manual_manualProxy->setChecked(true);
ui.manual_manualProxyHost->setText(P2QSTRING(options.manualProxyHostname));
ui.manual_manualProxyPort->setText(P2QSTRING(boost::lexical_cast<std::string>(options.manualProxyPort)));
}
+ ui.manual_forceTLS1_0->setChecked(options.tlsOptions.schannelTLS1_0Workaround);
}
} else {
ui.connectionMethod->setCurrentIndex(2);
ui.bosh_uri->setText(P2QSTRING(options.boshURL.toString()));
if (!options.boshHTTPConnectProxyURL.isEmpty()) {
ui.bosh_manualProxy->setChecked(true);
ui.bosh_manualProxyHost->setText(P2QSTRING(options.boshHTTPConnectProxyURL.getHost()));
if (options.boshHTTPConnectProxyURL.getPort()) {
ui.bosh_manualProxyPort->setText(P2QSTRING(boost::lexical_cast<std::string>(*options.boshHTTPConnectProxyURL.getPort())));
}
}
}
+#ifndef HAVE_SCHANNEL
+ ui.manual_forceTLS1_0->hide();
+#endif
}
void QtConnectionSettingsWindow::handleProxyTypeChanged(int index) {
bool proxySettingsVisible = index != NoProxy && index != SystemProxy;
ui.manual_manualProxy->setVisible(proxySettingsVisible);
ui.manual_manualProxyHostLabel->setVisible(proxySettingsVisible);
@@ -126,12 +131,13 @@ ClientOptions QtConnectionSettingsWindow::getOptions() {
/* Not automatic */
if (ui.connectionMethod->currentIndex() == 1) {
/* Manual */
options.useTLS = static_cast<ClientOptions::UseTLS>(ui.manual_useTLS->currentIndex());
options.useStreamCompression = ui.manual_allowCompression->isChecked();
options.allowPLAINWithoutTLS = ui.manual_allowPLAINWithoutTLS->isChecked();
+ options.tlsOptions.schannelTLS1_0Workaround = ui.manual_forceTLS1_0->isChecked();
if (ui.manual_manualHost->isChecked()) {
options.manualHostname = Q2PSTRING(ui.manual_manualHostName->text());
try {
options.manualPort = boost::lexical_cast<int>(Q2PSTRING(ui.manual_manualHostPort->text()));
} catch (const boost::bad_lexical_cast&) {
options.manualPort = -1;