Not entirely clear why, but when building the certificate chain for a peer the system certificate store is searched for root certificates. General expectation is that after calling `sslConfiguration.setCaCertificates()` the system certificates will not be taken into consideration. To work around this behavior, we do a manual check that the root of the chain is part of the configured CA certificates. Pick-to: 6.5 6.2 5.15 Change-Id: I03666a4d9b0eac39ae97e150b4743120611a11b3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
25 lines
611 B
CMake
25 lines
611 B
CMake
# Copyright (C) 2023 The Qt Company Ltd.
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
qt_internal_add_manual_test(tst_manual_ssl_client_auth
|
|
SOURCES
|
|
tst_manual_ssl_client_auth.cpp
|
|
LIBRARIES
|
|
Qt::Network
|
|
)
|
|
|
|
qt_internal_add_resource(tst_manual_ssl_client_auth "tst_manual_ssl_client_auth"
|
|
PREFIX
|
|
"/"
|
|
FILES
|
|
"certs/127.0.0.1.pem"
|
|
"certs/127.0.0.1-key.pem"
|
|
"certs/127.0.0.1-client.pem"
|
|
"certs/127.0.0.1-client-key.pem"
|
|
"certs/accepted-client.pem"
|
|
"certs/accepted-client-key.pem"
|
|
"certs/rootCA.pem"
|
|
BASE
|
|
"certs"
|
|
)
|