Fix prior change: no need for check when OpenSSL is active backend
It's not using keychains and not triggering a blocking system dialog. Change-Id: Id2a3b74ab3647890747fba9b8d261ab3e60fb3bc Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 07a0e4496ddf15ef469c3b244270300b9c855d44) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
6555c62630
commit
a48d7f0c73
@ -1,25 +1,36 @@
|
||||
// Copyright (C) 2024 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
||||
|
||||
#include <QtNetwork/qtnetworkglobal.h>
|
||||
|
||||
#include <QtCore/qsystemdetection.h>
|
||||
|
||||
#if QT_CONFIG(ssl)
|
||||
#include <QtNetwork/qsslsocket.h>
|
||||
#endif
|
||||
|
||||
namespace QtNetworkTestHelpers
|
||||
{
|
||||
|
||||
bool isSecureTransportBlockingTest()
|
||||
{
|
||||
#ifdef Q_OS_MACOS
|
||||
#if QT_CONFIG(ssl)
|
||||
if (QSslSocket::activeBackend() == QLatin1String("securetransport")) {
|
||||
#if QT_MACOS_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(150000, 180000)
|
||||
// Starting from macOS 15 our temporary keychain is ignored.
|
||||
// We have to use kSecImportToMemoryOnly/kCFBooleanTrue key/value
|
||||
// instead. This way we don't have to use QT_SSL_USE_TEMPORARY_KEYCHAIN anymore.
|
||||
return false;
|
||||
// Starting from macOS 15 our temporary keychain is ignored.
|
||||
// We have to use kSecImportToMemoryOnly/kCFBooleanTrue key/value
|
||||
// instead. This way we don't have to use QT_SSL_USE_TEMPORARY_KEYCHAIN anymore.
|
||||
return false;
|
||||
#else
|
||||
if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSSequoia) {
|
||||
// We were built with SDK below 15, but a file-based keychains are not working anymore on macOS 15...
|
||||
return true;
|
||||
if (QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSSequoia) {
|
||||
// We were built with SDK below 15, and running on/above 15, but file-based
|
||||
// keychains are not working anymore on macOS 15, blocking the test execution.
|
||||
return true;
|
||||
}
|
||||
#endif // Platform SDK.
|
||||
}
|
||||
#endif
|
||||
#endif // QT_CONFIG(ssl)
|
||||
#endif // Q_OS_MACOS
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user