1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

[SslV3Sites] Added possibility to change list of sites in settings.ini

In settings.ini: Web-Browser-Settings/SSLv3Sites

Also added sermapa.es to default list
This commit is contained in:
nowrep 2014-02-13 20:46:15 +01:00
parent d005505dba
commit 9ae0352548
4 changed files with 16 additions and 8 deletions

View File

@ -916,7 +916,7 @@ void MainApplication::saveSettings()
}
m_searchEnginesManager->saveSettings();
m_networkmanager->saveCertificates();
m_networkmanager->saveSettings();
m_plugins->shutdown();
qIconProvider->saveIconsToDatabase();
clearTempPath();

View File

@ -85,10 +85,6 @@ NetworkManager::NetworkManager(QObject* parent)
setProxyFactory(m_proxyFactory);
loadSettings();
// Force SSLv3 for servers that doesn't understand TLSv1 handshake
m_sslv3Sites << QLatin1String("centrum.sk") << QLatin1String("centrum.cz") << QLatin1String("oneaccount.com") << QLatin1String("hdi.de")
<< QLatin1String("live.com") << QLatin1String("i0.cz");
}
void NetworkManager::loadSettings()
@ -101,12 +97,20 @@ void NetworkManager::loadSettings()
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("hdi.de")
<< QLatin1String("live.com") << QLatin1String("i0.cz") << QLatin1String("sermepa.es");
settings.beginGroup("Web-Browser-Settings");
m_doNotTrack = settings.value("DoNotTrack", false).toBool();
m_sendReferer = settings.value("SendReferer", true).toBool();
m_sslv3Sites = settings.value("SSLv3Sites", sslv3Sites).toStringList();
settings.endGroup();
m_acceptLanguage = AcceptLanguage::generateHeader(settings.value("Language/acceptLanguage", AcceptLanguage::defaultLanguage()).toStringList());
#if defined(Q_OS_WIN) || defined(Q_OS_HAIKU) || defined(Q_OS_OS2)
QString certDir = mApp->PROFILEDIR + "certificates";
QString bundlePath = certDir + "/ca-bundle.crt";
@ -676,13 +680,17 @@ bool NetworkManager::unregisterSchemeHandler(const QString &scheme, SchemeHandle
return m_schemeHandlers.remove(scheme) == 1;
}
void NetworkManager::saveCertificates()
void NetworkManager::saveSettings()
{
Settings settings;
settings.beginGroup("SSL-Configuration");
settings.setValue("CACertPaths", m_certPaths);
settings.setValue("IgnoreAllSSLWarnings", m_ignoreAllWarnings);
settings.endGroup();
settings.beginGroup("Web-Browser-Settings");
settings.setValue("SSLv3Sites", m_sslv3Sites);
settings.endGroup();
}
void NetworkManager::loadCertificates()

View File

@ -37,7 +37,7 @@ public:
QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice* outgoingData);
void loadSettings();
void saveCertificates();
void saveSettings();
void loadCertificates();
QList<QSslCertificate> getCaCertificates() { return m_caCerts; }

View File

@ -204,7 +204,7 @@ void SSLManager::closeEvent(QCloseEvent* e)
}
mApp->networkManager()->setCertificatePaths(paths);
mApp->networkManager()->saveCertificates();
mApp->networkManager()->saveSettings();
QWidget::closeEvent(e);
}