mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
[NetworkManager] Use list of old servers that doesn't understand TLSv1 handshake
Force SslV3 for those old servers. Closes #1176 Closes #1141 Closes #1080
This commit is contained in:
parent
260447e414
commit
ee91727cb2
|
@ -84,6 +84,9 @@ NetworkManager::NetworkManager(QObject* parent)
|
|||
m_proxyFactory = new NetworkProxyFactory();
|
||||
setProxyFactory(m_proxyFactory);
|
||||
loadSettings();
|
||||
|
||||
m_sslv3Sites << QLatin1String("centrum.sk") << QLatin1String("oneaccount.com") << QLatin1String("www.hdi.de")
|
||||
<< QLatin1String("live.com");
|
||||
}
|
||||
|
||||
void NetworkManager::loadSettings()
|
||||
|
@ -571,6 +574,18 @@ 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 (req.url().host().endsWith(host)) {
|
||||
QSslConfiguration conf = req.sslConfiguration();
|
||||
conf.setProtocol(QSsl::SslV3);
|
||||
req.setSslConfiguration(conf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return QNetworkAccessManager::createRequest(op, req, outgoingData);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ private:
|
|||
AdBlockManager* m_adblockManager;
|
||||
NetworkProxyFactory* m_proxyFactory;
|
||||
|
||||
QStringList m_sslv3Sites;
|
||||
QStringList m_certPaths;
|
||||
QList<QSslCertificate> m_caCerts;
|
||||
QList<QSslCertificate> m_localCerts;
|
||||
|
|
Loading…
Reference in New Issue
Block a user