NOISSUE catch and log SSL errors for Download(s)
This commit is contained in:
parent
e6d734d9ac
commit
e44a0cb944
@ -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);
|
||||
|
@ -58,6 +58,7 @@ private: /* methods */
|
||||
protected slots:
|
||||
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal) override;
|
||||
void downloadError(QNetworkReply::NetworkError error) override;
|
||||
void sslErrors(const QList<QSslError> & errors);
|
||||
void downloadFinished() override;
|
||||
void downloadReadyRead() override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user