aboutsummaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'jobs')
-rw-r--r--jobs/basejob.cpp9
-rw-r--r--jobs/basejob.h1
2 files changed, 10 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
+}
diff --git a/jobs/basejob.h b/jobs/basejob.h
index 88911ca1..95cf4232 100644
--- a/jobs/basejob.h
+++ b/jobs/basejob.h
@@ -63,6 +63,7 @@ namespace QMatrixClient
protected slots:
virtual void gotReply();
void timeout();
+ void sslErrors(const QList<QSslError>& errors);
//void networkError(QNetworkReply::NetworkError code);