Set some SSL parameters for network request.
authorgregor herrmann <gregoa@debian.org>
Mon, 23 Jan 2017 17:56:46 +0000 (18:56 +0100)
committergregor herrmann <gregoa@debian.org>
Mon, 23 Jan 2017 17:58:50 +0000 (18:58 +0100)
src/gui/mainwindow.cpp

index bcfd3ec..a2e28d1 100644 (file)
@@ -24,6 +24,7 @@
 #include <QNetworkProxy>
 #include <QNetworkAccessManager>
 #include <QNetworkReply>
+#include <QSslConfiguration>
 
 #include "sqlengine.h"
 
@@ -435,7 +436,11 @@ void MainWindow::importData(const QByteArray &aData, const QString& url, int con
 void MainWindow::importFromNetwork(const QString& url, int conferenceId)
 {
     QNetworkRequest request;
+    QSslConfiguration qSslConfiguration = request.sslConfiguration();
+    qSslConfiguration.setProtocol(QSsl::AnyProtocol);
+    qSslConfiguration.setPeerVerifyMode(QSslSocket::QueryPeer);
     request.setUrl(QUrl(url));
+    request.setSslConfiguration(qSslConfiguration);
     request.setAttribute(QNetworkRequest::User, conferenceId);
 
     mNetworkAccessManager->setProxy(QNetworkProxy::applicationProxy());