From 313a95bdd125d50335909e5a68605a6cfa9f68dd Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 13 Feb 2019 20:09:08 +0800 Subject: [PATCH] Log DownloadManager SSL errors --- src/base/net/downloadmanager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/base/net/downloadmanager.cpp b/src/base/net/downloadmanager.cpp index 68a251d57..71a939a6a 100644 --- a/src/base/net/downloadmanager.cpp +++ b/src/base/net/downloadmanager.cpp @@ -42,6 +42,7 @@ #include #include "base/global.h" +#include "base/logger.h" #include "base/preferences.h" #include "downloadhandler.h" #include "proxyconfigurationmanager.h" @@ -272,7 +273,11 @@ void Net::DownloadManager::handleReplyFinished(QNetworkReply *reply) #ifndef QT_NO_OPENSSL void Net::DownloadManager::ignoreSslErrors(QNetworkReply *reply, const QList &errors) { - Q_UNUSED(errors) + QStringList errorList; + for (const QSslError &error : errors) + errorList += error.errorString(); + LogMsg(tr("Ignoring SSL error, URL: \"%1\", errors: \"%2\"").arg(reply->url().toString(), errorList.join(". ")), Log::WARNING); + // Ignore all SSL errors reply->ignoreSslErrors(); }