mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-07 01:35:25 +08:00
6.5.3 clean
This commit is contained in:
@ -21,6 +21,7 @@ qt_internal_add_test(tst_qsslsocket
|
||||
Qt::TestPrivate
|
||||
TESTDATA ${test_data}
|
||||
QT_TEST_SERVER_LIST "squid" "danted" "cyrus" "apache2" "echo"
|
||||
BUNDLE_ANDROID_OPENSSL_LIBS
|
||||
)
|
||||
|
||||
qt_internal_extend_target(tst_qsslsocket CONDITION QT_FEATURE_private_tests AND QT_FEATURE_openssl_linked
|
||||
|
@ -291,6 +291,7 @@ private:
|
||||
QSslSocket *socket;
|
||||
QList<QSslError> storedExpectedSslErrors;
|
||||
bool isTestingOpenSsl = false;
|
||||
bool isSecurityLevel0Required = false;
|
||||
bool opensslResolved = false;
|
||||
bool isTestingSecureTransport = false;
|
||||
bool isTestingSchannel = false;
|
||||
@ -410,6 +411,9 @@ void tst_QSslSocket::initTestCase()
|
||||
flukeCertificateError = QSslError::SelfSignedCertificate;
|
||||
#if QT_CONFIG(openssl)
|
||||
opensslResolved = qt_auto_test_resolve_OpenSSL_symbols();
|
||||
// This is where OpenSSL moved several protocols under
|
||||
// non-default (0) security level (the default is 1).
|
||||
isSecurityLevel0Required = OPENSSL_VERSION_NUMBER >= 0x30100010;
|
||||
#else
|
||||
opensslResolved = false; // Not 'unused variable' anymore.
|
||||
#endif
|
||||
@ -808,6 +812,10 @@ void tst_QSslSocket::simpleConnect()
|
||||
if (!QSslSocket::supportsSsl())
|
||||
return;
|
||||
|
||||
// Starting from OpenSSL v 3.1.1 deprecated protocol versions (we want to use when connecting) are not available by default.
|
||||
if (isSecurityLevel0Required)
|
||||
QSKIP("Testing with OpenSSL backend, but security level 0 is required for TLS v1.1 or earlier");
|
||||
|
||||
QFETCH_GLOBAL(bool, setProxy);
|
||||
if (setProxy)
|
||||
return;
|
||||
@ -869,6 +877,10 @@ void tst_QSslSocket::simpleConnectWithIgnore()
|
||||
if (!QSslSocket::supportsSsl())
|
||||
return;
|
||||
|
||||
// Starting from OpenSSL v 3.1.1 deprecated protocol versions (we want to use when connecting) are not available by default.
|
||||
if (isSecurityLevel0Required)
|
||||
QSKIP("Testing with OpenSSL backend, but security level 0 is required for TLS v1.1 or earlier");
|
||||
|
||||
QFETCH_GLOBAL(bool, setProxy);
|
||||
if (setProxy)
|
||||
return;
|
||||
@ -913,6 +925,10 @@ void tst_QSslSocket::simpleConnectWithIgnore()
|
||||
|
||||
void tst_QSslSocket::sslErrors_data()
|
||||
{
|
||||
// Starting from OpenSSL v 3.1.1 deprecated protocol versions (we want to use in 'sslErrors' test) are not available by default.
|
||||
if (isSecurityLevel0Required)
|
||||
QSKIP("Testing with OpenSSL backend, but security level 0 is required for TLS v1.1 or earlier");
|
||||
|
||||
QTest::addColumn<QString>("host");
|
||||
QTest::addColumn<int>("port");
|
||||
|
||||
@ -1294,6 +1310,7 @@ void tst_QSslSocket::privateKey()
|
||||
#if QT_CONFIG(openssl)
|
||||
void tst_QSslSocket::privateKeyOpaque()
|
||||
{
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
if (!isTestingOpenSsl)
|
||||
QSKIP("The active TLS backend does not support private opaque keys");
|
||||
|
||||
@ -1327,6 +1344,7 @@ void tst_QSslSocket::privateKeyOpaque()
|
||||
QFETCH_GLOBAL(bool, setProxy);
|
||||
if (setProxy && !socket->waitForEncrypted(10000))
|
||||
QSKIP("Skipping flaky test - See QTBUG-29941");
|
||||
#endif // OPENSSL_NO_DEPRECATED_3_0
|
||||
}
|
||||
#endif // Feature 'openssl'.
|
||||
|
||||
@ -1965,6 +1983,10 @@ void tst_QSslSocket::waitForConnectedEncryptedReadyRead()
|
||||
if (!QSslSocket::supportsSsl())
|
||||
return;
|
||||
|
||||
// Starting from OpenSSL v 3.1.1 deprecated protocol versions (we want to use here) are not available by default.
|
||||
if (isSecurityLevel0Required)
|
||||
QSKIP("Testing with OpenSSL backend, but security level 0 is required for TLS v1.1 or earlier");
|
||||
|
||||
QSslSocketPtr socket = newSocket();
|
||||
this->socket = socket.data();
|
||||
|
||||
@ -3104,6 +3126,10 @@ void tst_QSslSocket::encryptWithoutConnecting()
|
||||
|
||||
void tst_QSslSocket::resume_data()
|
||||
{
|
||||
// Starting from OpenSSL v 3.1.1 deprecated protocol versions (we want to use in 'resume' test) are not available by default.
|
||||
if (isSecurityLevel0Required)
|
||||
QSKIP("Testing with OpenSSL backend, but security level 0 is required for TLS v1.1 or earlier");
|
||||
|
||||
QTest::addColumn<bool>("ignoreErrorsAfterPause");
|
||||
QTest::addColumn<QList<QSslError> >("errorsToIgnore");
|
||||
QTest::addColumn<bool>("expectSuccess");
|
||||
@ -3508,6 +3534,8 @@ void tst_QSslSocket::dhServerCustomParams()
|
||||
{
|
||||
if (!QSslSocket::supportsSsl())
|
||||
QSKIP("No SSL support");
|
||||
if (!QSslSocket::isClassImplemented(QSsl::ImplementedClass::DiffieHellman))
|
||||
QSKIP("The current backend doesn't support diffie hellman parameters");
|
||||
|
||||
QFETCH_GLOBAL(bool, setProxy);
|
||||
if (setProxy)
|
||||
|
Reference in New Issue
Block a user