From e53fc69a91553b57932ba599b39999d550114588 Mon Sep 17 00:00:00 2001 From: Michael Marley Date: Wed, 26 Feb 2014 01:53:36 +0000 Subject: [PATCH] Use autonegotiation to choose an SSL protocol. Previously, the user manually configured which SSL protocol to use when connecting to IRC. The default was SSLv3. A better idea is to allow Qt to automatically negotiate the best protocol out of the available secure protocols, which this patch implements. --- src/core/corenetwork.cpp | 1 - .../settingspages/networkssettingspage.cpp | 2 - src/qtui/settingspages/servereditdlg.ui | 47 ------------------- 3 files changed, 50 deletions(-) diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 3fd0a1a7..798f27c8 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -185,7 +185,6 @@ void CoreNetwork::connectToIrc(bool reconnecting) enablePingTimeout(); #ifdef HAVE_SSL - socket.setProtocol((QSsl::SslProtocol)server.sslVersion); if (server.useSsl) { CoreIdentity *identity = identityPtr(); if (identity) { diff --git a/src/qtui/settingspages/networkssettingspage.cpp b/src/qtui/settingspages/networkssettingspage.cpp index 142f3d0c..6f150751 100644 --- a/src/qtui/settingspages/networkssettingspage.cpp +++ b/src/qtui/settingspages/networkssettingspage.cpp @@ -867,7 +867,6 @@ ServerEditDlg::ServerEditDlg(const Network::Server &server, QWidget *parent) : Q ui.port->setValue(server.port); ui.password->setText(server.password); ui.useSSL->setChecked(server.useSsl); - ui.sslVersion->setCurrentIndex(server.sslVersion); ui.useProxy->setChecked(server.useProxy); ui.proxyType->setCurrentIndex(server.proxyType == QNetworkProxy::Socks5Proxy ? 0 : 1); ui.proxyHost->setText(server.proxyHost); @@ -881,7 +880,6 @@ ServerEditDlg::ServerEditDlg(const Network::Server &server, QWidget *parent) : Q Network::Server ServerEditDlg::serverData() const { Network::Server server(ui.host->text().trimmed(), ui.port->value(), ui.password->text(), ui.useSSL->isChecked()); - server.sslVersion = ui.sslVersion->currentIndex(); server.useProxy = ui.useProxy->isChecked(); server.proxyType = ui.proxyType->currentIndex() == 0 ? QNetworkProxy::Socks5Proxy : QNetworkProxy::HttpProxy; server.proxyHost = ui.proxyHost->text(); diff --git a/src/qtui/settingspages/servereditdlg.ui b/src/qtui/settingspages/servereditdlg.ui index da9f7a5a..d16d1e49 100644 --- a/src/qtui/settingspages/servereditdlg.ui +++ b/src/qtui/settingspages/servereditdlg.ui @@ -119,52 +119,6 @@ Advanced - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - SSL Version: - - - - - - - Do not change unless you're going to connect to a server not supporting SSLv3! - - - - SSLv3 (default) - - - - - SSLv2 - - - - - TLSv1 - - - - - - @@ -309,7 +263,6 @@ port password useSSL - sslVersion useProxy proxyType proxyHost -- 2.20.1