mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
HoloLens: RicHoloLensRestClient now has an explicit setter for disabling SSL certificate verification. Removed separate flag for controlling whether debug export to file will be done. Now does the export whenever a folder is specified.
This commit is contained in:
@@ -18,9 +18,6 @@
|
||||
|
||||
#include "RicHoloLensRestClient.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfTrace.h"
|
||||
|
||||
@@ -54,7 +51,8 @@
|
||||
RicHoloLensRestClient::RicHoloLensRestClient(QString serverUrl, QString sessionName, RicHoloLensRestResponseHandler* responseHandler)
|
||||
: m_serverUrl(serverUrl),
|
||||
m_sessionName(sessionName),
|
||||
m_responseHandler(responseHandler)
|
||||
m_responseHandler(responseHandler),
|
||||
m_dbgDisableCertificateVerification(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -66,6 +64,14 @@ void RicHoloLensRestClient::clearResponseHandler()
|
||||
m_responseHandler = nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicHoloLensRestClient::dbgDisableCertificateVerification()
|
||||
{
|
||||
m_dbgDisableCertificateVerification = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -84,14 +90,13 @@ void RicHoloLensRestClient::createSession(const QByteArray& sessionPinCode)
|
||||
// NOTE !!!
|
||||
// Apparently something like this is currently needed in order to get SSL/HTTPS going
|
||||
// Still, can't quite figure it out since it appears to be sufficient to do this on the first request
|
||||
// This will have to be investigated further, SP 20181924
|
||||
// This will have to be investigated further, SP 20180924
|
||||
QSslConfiguration sslConf = request.sslConfiguration();
|
||||
|
||||
// Needed this one to be able to connect to sharing server
|
||||
sslConf.setProtocol(QSsl::AnyProtocol);
|
||||
|
||||
bool disableCertificateVerification = RiaApplication::instance()->preferences()->holoLensDisableCertificateVerification();
|
||||
if (disableCertificateVerification)
|
||||
if (m_dbgDisableCertificateVerification)
|
||||
{
|
||||
sslConf.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user