Fix cert pinning on macOS

This commit is contained in:
Cameron Gutman 2018-12-25 21:15:59 -08:00
parent d1640e3bb8
commit 8be73142f8

View file

@ -423,6 +423,11 @@ NvHTTP::openConnection(QUrl baseUrl,
QList<QSslError> 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);
}