summaryrefslogtreecommitdiffstats
path: root/api/logic/net/Download.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-11-01 22:52:11 +0100
committerPetr Mrázek <peterix@gmail.com>2017-11-01 22:52:11 +0100
commite44a0cb9445f79e221efcdb4fbef19353a8801f1 (patch)
tree17b9422b1b6fcd0c042ce71f99075f9843d23d7c /api/logic/net/Download.cpp
parente6d734d9ac099d918a9ca70e1579de51f5eca20e (diff)
downloadMultiMC-e44a0cb9445f79e221efcdb4fbef19353a8801f1.tar
MultiMC-e44a0cb9445f79e221efcdb4fbef19353a8801f1.tar.gz
MultiMC-e44a0cb9445f79e221efcdb4fbef19353a8801f1.tar.lz
MultiMC-e44a0cb9445f79e221efcdb4fbef19353a8801f1.tar.xz
MultiMC-e44a0cb9445f79e221efcdb4fbef19353a8801f1.zip
NOISSUE catch and log SSL errors for Download(s)
Diffstat (limited to 'api/logic/net/Download.cpp')
-rw-r--r--api/logic/net/Download.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/api/logic/net/Download.cpp b/api/logic/net/Download.cpp
index 12c1b201..aca0c7d7 100644
--- a/api/logic/net/Download.cpp
+++ b/api/logic/net/Download.cpp
@@ -135,6 +135,18 @@ void Download::downloadError(QNetworkReply::NetworkError error)
}
}
+void Download::sslErrors(const QList<QSslError> & errors)
+{
+ int i = 1;
+ for (auto error : errors)
+ {
+ qCritical() << "Download" << m_url.toString() << "SSL Error #" << i << " : " << error.errorString();
+ auto cert = error.certificate();
+ qCritical() << "Certificate in question:\n" << cert.toText();
+ i++;
+ }
+}
+
bool Download::handleRedirect()
{
QVariant redirect = m_reply->header(QNetworkRequest::LocationHeader);