summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qmltests/tst_qmltests.cpp
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2021-05-10 09:40:52 +0200
committerMichal Klocek <michal.klocek@qt.io>2021-05-22 14:10:59 +0200
commit035579f424e5b69cee212d23fda3467f5db8d19e (patch)
treed72b17ea3d92f68cd30c63c7fe9a12ff5415901e /tests/auto/quick/qmltests/tst_qmltests.cpp
parentcf49605c1b93ecdbaa0fa086181beb2c05001747 (diff)
Fix not working certificates on mac > 10.14
From macOS 10.15 onwards there are new security requirements for TLS server certificates: https://support.apple.com/en-us/HT210176 Now all certificates without required fields are reported as NET::ERR_CERT_INVALID and there is no way to 'bypass' this error. Our test expects ERR_CERT_AUTHORITY_INVALID value, for which browsers have an visual option to bypass. 'Fix' certificate by adding new required fields: * Subject Alternative Name * Extended Key Usage Generate a new certificate chain with two certificates, where the server certificate has the extension config file in the form of: [SAN] subjectAltName=DNS:webengine.qt.io extendedKeyUsage=serverAuth Use 2048 bit for private key, otherwise tests fail on ubuntu. Task-number: QTBUG-91230 Pick-to: 5.15 Change-Id: I81d878cf3cae3e9fcc51bfbf250fba9185ca4b01 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/quick/qmltests/tst_qmltests.cpp')
-rw-r--r--tests/auto/quick/qmltests/tst_qmltests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/quick/qmltests/tst_qmltests.cpp b/tests/auto/quick/qmltests/tst_qmltests.cpp
index 2cf811f91..9bb45cdd7 100644
--- a/tests/auto/quick/qmltests/tst_qmltests.cpp
+++ b/tests/auto/quick/qmltests/tst_qmltests.cpp
@@ -160,7 +160,7 @@ int main(int argc, char **argv)
#if QT_CONFIG(ssl)
qmlRegisterSingletonType<HttpsServer>(
"Test.Shared", 1, 0, "HttpsServer",
- [&](QQmlEngine *, QJSEngine *) { return new HttpsServer(":/resources/cert.pem",":/resources/key.pem"); });
+ [&](QQmlEngine *, QJSEngine *) { return new HttpsServer(":/resources/server.pem",":/resources/server.key"); });
#endif
int i = quick_test_main(argc, argv, "qmltests", qPrintable(QT_TESTCASE_BUILDDIR + QLatin1String("/webengine.qmltests")));