Set some SSL parameters for network request.
[toast/confclerk.git] / 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());