From 2c440249052b0d518fccd953a7dc657f9eed7ab7 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 30 Dec 2017 17:50:07 +0900 Subject: BaseJob: do not suppress SSL errors It is the application's responsibility to properly display the error and get confirmation from the user about it. --- jobs/basejob.cpp | 9 --------- jobs/basejob.h | 1 - 2 files changed, 10 deletions(-) diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp index 3ea13c83..8d116c26 100644 --- a/jobs/basejob.cpp +++ b/jobs/basejob.cpp @@ -191,7 +191,6 @@ void BaseJob::sendRequest() if (!d->requestQuery.isEmpty()) qCDebug(d->logCat) << " query:" << d->requestQuery.toString(); d->sendRequest(); - connect( d->reply.data(), &QNetworkReply::sslErrors, this, &BaseJob::sslErrors ); connect( d->reply.data(), &QNetworkReply::finished, this, &BaseJob::gotReply ); if (d->reply->isRunning()) { @@ -371,14 +370,6 @@ void BaseJob::timeout() finishJob(); } -void BaseJob::sslErrors(const QList& errors) -{ - foreach (const QSslError &error, errors) { - qCWarning(d->logCat) << "SSL ERROR" << error.errorString(); - } - d->reply->ignoreSslErrors(); // TODO: insecure! should prompt user first -} - void BaseJob::setLoggingCategory(LoggingCategory lcf) { d->logCat = lcf; diff --git a/jobs/basejob.h b/jobs/basejob.h index 0d669b78..e3a379fa 100644 --- a/jobs/basejob.h +++ b/jobs/basejob.h @@ -267,7 +267,6 @@ namespace QMatrixClient virtual ~BaseJob(); protected slots: void timeout(); - void sslErrors(const QList& errors); private slots: void sendRequest(); -- cgit v1.2.3