diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 1dd939473..4958dd51d 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -916,7 +916,7 @@ void MainApplication::saveSettings() } m_searchEnginesManager->saveSettings(); - m_networkmanager->saveCertificates(); + m_networkmanager->saveSettings(); m_plugins->shutdown(); qIconProvider->saveIconsToDatabase(); clearTempPath(); diff --git a/src/lib/network/networkmanager.cpp b/src/lib/network/networkmanager.cpp index 319c02230..b2ccfe385 100644 --- a/src/lib/network/networkmanager.cpp +++ b/src/lib/network/networkmanager.cpp @@ -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() diff --git a/src/lib/network/networkmanager.h b/src/lib/network/networkmanager.h index a1723a469..099abd533 100644 --- a/src/lib/network/networkmanager.h +++ b/src/lib/network/networkmanager.h @@ -37,7 +37,7 @@ public: QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice* outgoingData); void loadSettings(); - void saveCertificates(); + void saveSettings(); void loadCertificates(); QList getCaCertificates() { return m_caCerts; } diff --git a/src/lib/preferences/sslmanager.cpp b/src/lib/preferences/sslmanager.cpp index f2e1139ae..5811518fb 100644 --- a/src/lib/preferences/sslmanager.cpp +++ b/src/lib/preferences/sslmanager.cpp @@ -204,7 +204,7 @@ void SSLManager::closeEvent(QCloseEvent* e) } mApp->networkManager()->setCertificatePaths(paths); - mApp->networkManager()->saveCertificates(); + mApp->networkManager()->saveSettings(); QWidget::closeEvent(e); }