diff options
Diffstat (limited to 'jobs/basejob.cpp')
-rw-r--r-- | jobs/basejob.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp index bf4ade89..519e1517 100644 --- a/jobs/basejob.cpp +++ b/jobs/basejob.cpp @@ -97,6 +97,7 @@ void BaseJob::start() d->reply = d->connection->nam()->put(req, data.toJson()); break; } + connect( d->reply, &QNetworkReply::sslErrors, this, &BaseJob::sslErrors ); connect( d->reply, &QNetworkReply::finished, this, &BaseJob::gotReply ); QTimer::singleShot( 120*1000, this, SLOT(timeout()) ); // connect( d->reply, static_cast<void(QNetworkReply::*)(QNetworkReply::NetworkError)>(&QNetworkReply::error), @@ -144,3 +145,11 @@ void BaseJob::timeout() if( d->reply->isRunning() ) d->reply->abort(); } + +void BaseJob::sslErrors(const QList<QSslError>& errors) +{ + foreach (const QSslError &error, errors) { + qWarning() << "SSL ERROR" << error.errorString(); + } + d->reply->ignoreSslErrors(); // TODO: insecure! should prompt user first +} |