From ec916226b09d63154d5622c0a3e027b7da453c75 Mon Sep 17 00:00:00 2001 From: Justin Clift Date: Thu, 6 Apr 2017 20:37:31 +0100 Subject: [PATCH] Add dodgy temporary workaround for Qt OSX's missing cert verify() --- src/RemoteDatabase.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/RemoteDatabase.cpp b/src/RemoteDatabase.cpp index 7ab767f5..8a223375 100644 --- a/src/RemoteDatabase.cpp +++ b/src/RemoteDatabase.cpp @@ -71,6 +71,12 @@ void RemoteDatabase::reloadSettings() void RemoteDatabase::gotEncrypted(QNetworkReply* reply) { +#ifdef Q_OS_MAC + // Temporary workaround for now, as Qt 5.8 and below doesn't support + // verifying certificates on OSX: https://bugreports.qt.io/browse/QTBUG-56973 + // Hopefully this is fixed in Qt 5.9 + return; +#else // Verify the server's certificate using our CA certs auto verificationErrors = reply->sslConfiguration().peerCertificate().verify(m_sslConfiguration.caCertificates()); bool good = false; @@ -86,6 +92,7 @@ void RemoteDatabase::gotEncrypted(QNetworkReply* reply) // If the server certificate didn't turn out to be good, abort the reply here if(!good) reply->abort(); +#endif } void RemoteDatabase::gotReply(QNetworkReply* reply)