1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Drop SSLV3Sites workaround

It is no longer needed, but moreover it is now also not wanted
due to recent SSLv3 security issues.
This commit is contained in:
David Rosca 2014-11-16 22:42:14 +01:00
parent 3ccb529117
commit 3b38d25277
4 changed files with 0 additions and 52 deletions

View File

@ -100,15 +100,9 @@ void NetworkManager::loadSettings()
setCache(cache); setCache(cache);
} }
// Force SSLv3 for servers that doesn't understand TLSv1 handshake
QStringList sslv3Sites;
sslv3Sites << QLatin1String("centrum.sk") << QLatin1String("centrum.cz") << QLatin1String("oneaccount.com")
<< QLatin1String("i0.cz") << QLatin1String("sermepa.es");
settings.beginGroup("Web-Browser-Settings"); settings.beginGroup("Web-Browser-Settings");
m_doNotTrack = settings.value("DoNotTrack", false).toBool(); m_doNotTrack = settings.value("DoNotTrack", false).toBool();
m_sendReferer = settings.value("SendReferer", true).toBool(); m_sendReferer = settings.value("SendReferer", true).toBool();
m_sslv3Sites = settings.value("SSLv3Sites", sslv3Sites).toStringList();
settings.endGroup(); settings.endGroup();
m_acceptLanguage = AcceptLanguage::generateHeader(settings.value("Language/acceptLanguage", AcceptLanguage::defaultLanguage()).toStringList()); m_acceptLanguage = AcceptLanguage::generateHeader(settings.value("Language/acceptLanguage", AcceptLanguage::defaultLanguage()).toStringList());
@ -598,18 +592,6 @@ QNetworkReply* NetworkManager::createRequest(QNetworkAccessManager::Operation op
} }
} }
// Force SSLv3 for servers that doesn't understand TLSv1 handshake
if (req.url().scheme() == QLatin1String("https")) {
foreach (const QString &host, m_sslv3Sites) {
if (QzTools::matchDomain(host, req.url().host())) {
QSslConfiguration conf = req.sslConfiguration();
conf.setProtocol(QSsl::SslV3);
req.setSslConfiguration(conf);
break;
}
}
}
return QNetworkAccessManager::createRequest(op, req, outgoingData); return QNetworkAccessManager::createRequest(op, req, outgoingData);
} }
@ -732,7 +714,6 @@ void NetworkManager::saveSettings()
settings.endGroup(); settings.endGroup();
settings.beginGroup("Web-Browser-Settings"); settings.beginGroup("Web-Browser-Settings");
settings.setValue("SSLv3Sites", m_sslv3Sites);
settings.endGroup(); settings.endGroup();
} }

View File

@ -76,7 +76,6 @@ private:
AdBlockManager* m_adblockManager; AdBlockManager* m_adblockManager;
NetworkProxyFactory* m_proxyFactory; NetworkProxyFactory* m_proxyFactory;
QStringList m_sslv3Sites;
QStringList m_certPaths; QStringList m_certPaths;
QList<QSslCertificate> m_caCerts; QList<QSslCertificate> m_caCerts;
QList<QSslCertificate> m_localCerts; QList<QSslCertificate> m_localCerts;

View File

@ -26,38 +26,9 @@
void NetworkTest::initTestCase() void NetworkTest::initTestCase()
{ {
m_manager = new QNetworkAccessManager; m_manager = new QNetworkAccessManager;
QSslConfiguration conf = QSslConfiguration::defaultConfiguration();
conf.setProtocol(QSsl::SslV3);
QSslConfiguration::setDefaultConfiguration(conf);
} }
void NetworkTest::cleanupTestCase() void NetworkTest::cleanupTestCase()
{ {
delete m_manager; delete m_manager;
} }
void NetworkTest::sslv3test_data()
{
QTest::addColumn<QUrl>("url");
// Sites that loads only with SslV3 forced and have it forced in NetworkManager
QTest::newRow("centrum.sk") << QUrl("https://user.centrum.sk/");
QTest::newRow("centrum.cz") << QUrl("https://user.centrum.cz/");
QTest::newRow("oneaccount.com") << QUrl("https://service.oneaccount.com/onlineV2/OSV2?event=login&pt=3");
QTest::newRow("i0.cz") << QUrl("https://i0.cz/6/ju/css/login/centrum.sk.css");
}
void NetworkTest::sslv3test()
{
QFETCH(QUrl, url);
QNetworkReply *reply = m_manager->get(QNetworkRequest(url));
QEventLoop loop;
connect(m_manager, SIGNAL(finished(QNetworkReply*)), &loop, SLOT(quit()));
loop.exec();
QCOMPARE(QNetworkReply::NoError, reply->error());
QCOMPARE(false, reply->readAll().isEmpty());
}

View File

@ -30,9 +30,6 @@ private slots:
void initTestCase(); void initTestCase();
void cleanupTestCase(); void cleanupTestCase();
void sslv3test_data();
void sslv3test();
private: private:
QNetworkAccessManager *m_manager; QNetworkAccessManager *m_manager;
}; };