From 8be73142f8a072987273abaa2e5c99e3e26a4cd9 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 25 Dec 2018 21:15:59 -0800 Subject: [PATCH] Fix cert pinning on macOS --- app/backend/nvhttp.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/backend/nvhttp.cpp b/app/backend/nvhttp.cpp index 40899038..c95f46bb 100644 --- a/app/backend/nvhttp.cpp +++ b/app/backend/nvhttp.cpp @@ -423,6 +423,11 @@ NvHTTP::openConnection(QUrl baseUrl, QList expectedSslErrors; expectedSslErrors.append(QSslError(QSslError::HostNameMismatch, m_ServerCert)); expectedSslErrors.append(QSslError(QSslError::SelfSignedCertificate, m_ServerCert)); + + // The SecureTransport backend for Qt TLS on macOS throws CertificateUntrusted + // instead of SelfSignedCertificate, so we will need to allow that error too. + expectedSslErrors.append(QSslError(QSslError::CertificateUntrusted, m_ServerCert)); + reply->ignoreSslErrors(expectedSslErrors); }