SecureTransport - make 'securetransport' feature public
Given the current feature disparity, it makes sense to give our users ability to detect if they can use some feature or not in their application code, using our 'modern' QT_CONFIG(securetransport). Accordingly, use this new syntax in our own auto-tests. Change-Id: Ib33b03e7e602e9f8b0db8251377c89dbaada1049 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
ba3480ebc6
commit
ef840bef5c
@ -270,7 +270,7 @@
|
||||
"disable": "input.securetransport == 'no' || input.ssl == 'no'",
|
||||
"condition": "config.darwin && (input.openssl == '' || input.openssl == 'no')",
|
||||
"output": [
|
||||
"privateFeature",
|
||||
"publicFeature",
|
||||
{ "type": "define", "name": "QT_SECURETRANSPORT" }
|
||||
]
|
||||
},
|
||||
|
@ -814,7 +814,7 @@ void tst_QSslCertificate::task256066toPem()
|
||||
|
||||
void tst_QSslCertificate::nulInCN()
|
||||
{
|
||||
#if defined(QT_SECURETRANSPORT) || defined(Q_OS_WINRT) || QT_CONFIG(schannel)
|
||||
#if QT_CONFIG(securetransport) || defined(Q_OS_WINRT) || QT_CONFIG(schannel)
|
||||
QSKIP("Generic QSslCertificatePrivate fails this test");
|
||||
#endif
|
||||
QList<QSslCertificate> certList =
|
||||
@ -833,7 +833,7 @@ void tst_QSslCertificate::nulInCN()
|
||||
|
||||
void tst_QSslCertificate::nulInSan()
|
||||
{
|
||||
#if defined(QT_SECURETRANSPORT) || defined(Q_OS_WINRT) || QT_CONFIG(schannel)
|
||||
#if QT_CONFIG(securetransport) || defined(Q_OS_WINRT) || QT_CONFIG(schannel)
|
||||
QSKIP("Generic QSslCertificatePrivate fails this test");
|
||||
#endif
|
||||
QList<QSslCertificate> certList =
|
||||
@ -968,7 +968,7 @@ void tst_QSslCertificate::subjectAndIssuerAttributes()
|
||||
|
||||
void tst_QSslCertificate::verify()
|
||||
{
|
||||
#ifdef QT_SECURETRANSPORT
|
||||
#if QT_CONFIG(securetransport)
|
||||
QSKIP("Not implemented in SecureTransport");
|
||||
#endif
|
||||
QList<QSslError> errors;
|
||||
|
@ -3255,14 +3255,14 @@ void tst_QSslSocket::verifyClientCertificate_data()
|
||||
|
||||
void tst_QSslSocket::verifyClientCertificate()
|
||||
{
|
||||
#ifdef QT_SECURETRANSPORT
|
||||
#if QT_CONFIG(securetransport)
|
||||
// We run both client and server on the same machine,
|
||||
// this means, client can update keychain with client's certificates,
|
||||
// and server later will use the same certificates from the same
|
||||
// keychain thus making tests fail (wrong number of certificates,
|
||||
// success instead of failure etc.).
|
||||
QSKIP("This test can not work with Secure Transport");
|
||||
#endif
|
||||
#endif // QT_CONFIG(securetransport)
|
||||
#ifdef Q_OS_WINRT
|
||||
QSKIP("Server-side encryption is not implemented on WinRT.");
|
||||
#endif
|
||||
@ -3344,7 +3344,7 @@ void tst_QSslSocket::verifyClientCertificate()
|
||||
|
||||
void tst_QSslSocket::readBufferMaxSize()
|
||||
{
|
||||
#if defined(QT_SECURETRANSPORT) || QT_CONFIG(schannel)
|
||||
#if QT_CONFIG(securetransport) || QT_CONFIG(schannel)
|
||||
// QTBUG-55170:
|
||||
// SecureTransport back-end was ignoring read-buffer
|
||||
// size limit, resulting (potentially) in a constantly
|
||||
@ -3401,7 +3401,7 @@ void tst_QSslSocket::readBufferMaxSize()
|
||||
QCOMPARE(client->bytesAvailable() + readSoFar, message.size());
|
||||
#else
|
||||
// Not needed, QSslSocket works correctly with other back-ends.
|
||||
#endif
|
||||
#endif // QT_CONFIG(securetransport) || QT_CONFIG(schannel)
|
||||
}
|
||||
|
||||
void tst_QSslSocket::setEmptyDefaultConfiguration() // this test should be last, as it has some side effects
|
||||
|
Loading…
Reference in New Issue
Block a user