summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorShane Kearns <ext-shane.2.kearns@nokia.com>2012-02-20 17:02:41 +0000
committerQt by Nokia <qt-info@nokia.com>2012-02-21 15:28:40 +0100
commit3f91cde588ad32277ba06d625ed36256ec65f88e (patch)
tree6e8a7692743cf64cd77721f466558a7180dae3a3 /tests
parent3fe79f23a97323521eb0182f8b46b0d0fc9ce44b (diff)
Test for QT_NO_SSL instead of QT_NO_OPENSSL
Change the ifdefs in our own code (except openssl backend) to use the new configure flag. Change-Id: I8774734771c66b22164b5fae8fdb27814ac3df7b Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp10
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp64
-rw-r--r--tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp10
-rw-r--r--tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp8
-rw-r--r--tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp6
-rw-r--r--tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp6
-rw-r--r--tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp4
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp20
-rw-r--r--tests/auto/other/networkselftest/tst_networkselftest.cpp14
-rw-r--r--tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp4
-rw-r--r--tests/manual/qnetworkreply/main.cpp2
11 files changed, 74 insertions, 74 deletions
diff --git a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index 94346f726d..f9f3b26898 100644
--- a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -58,7 +58,7 @@ public Q_SLOTS:
void finishedReply();
void finishedWithError(QNetworkReply::NetworkError errorCode, const QString &detail);
void challenge401(const QHttpNetworkRequest &request, QAuthenticator *authenticator);
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void sslErrors(const QList<QSslError> &errors);
#endif
private:
@@ -92,11 +92,11 @@ private Q_SLOTS:
void compression_data();
void compression();
#endif
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void ignoresslerror_data();
void ignoresslerror();
#endif
-#ifdef QT_NO_OPENSSL
+#ifdef QT_NO_SSL
void nossl_data();
void nossl();
#endif
@@ -665,7 +665,7 @@ void tst_QHttpNetworkConnection::compression()
}
#endif
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_QHttpNetworkConnection::sslErrors(const QList<QSslError> &errors)
{
Q_UNUSED(errors)
@@ -745,7 +745,7 @@ void tst_QHttpNetworkConnection::ignoresslerror()
}
#endif
-#ifdef QT_NO_OPENSSL
+#ifdef QT_NO_SSL
Q_DECLARE_METATYPE(QNetworkReply::NetworkError)
void tst_QHttpNetworkConnection::nossl_data()
{
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 279570b547..671d03cf84 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -67,7 +67,7 @@
#include <QtNetwork/QHttpPart>
#include <QtNetwork/QHttpMultiPart>
#include <QtNetwork/QNetworkProxyQuery>
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
#include <QtNetwork/qsslerror.h>
#include <QtNetwork/qsslconfiguration.h>
#endif
@@ -93,7 +93,7 @@ Q_DECLARE_METATYPE(QNetworkReply::NetworkError)
Q_DECLARE_METATYPE(QBuffer*)
Q_DECLARE_METATYPE(QHttpMultiPart *)
Q_DECLARE_METATYPE(QList<QFile*>) // for multiparts
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
Q_DECLARE_METATYPE(QSslConfiguration)
#endif
@@ -143,7 +143,7 @@ class tst_QNetworkReply: public QObject
QList<ProxyData> proxies;
QNetworkAccessManager manager;
MyCookieJar *cookieJar;
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QSslConfiguration storedSslConfiguration;
QList<QSslError> storedExpectedSslErrors;
#endif
@@ -172,7 +172,7 @@ public Q_SLOTS:
void proxyAuthenticationRequired(const QNetworkProxy &,QAuthenticator*);
void pipeliningHelperSlot();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void sslErrors(QNetworkReply*,const QList<QSslError> &);
void storeSslConfiguration();
void ignoreSslErrorListSlot(QNetworkReply *reply, const QList<QSslError> &);
@@ -248,7 +248,7 @@ private Q_SLOTS:
void ioGetFromHttpWithProxyAuth();
void ioGetFromHttpWithProxyAuthSynchronous();
void ioGetFromHttpWithSocksProxy();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void ioGetFromHttpsWithSslErrors();
void ioGetFromHttpsWithIgnoreSslErrors();
void ioGetFromHttpsWithSslHandshakeError();
@@ -336,7 +336,7 @@ private Q_SLOTS:
void httpRecursiveCreation();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void ioPostToHttpsUploadProgress();
void ignoreSslErrorsList_data();
void ignoreSslErrorsList();
@@ -378,7 +378,7 @@ private Q_SLOTS:
void synchronousRequest_data();
void synchronousRequest();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void synchronousRequestSslFailure();
#endif
@@ -450,7 +450,7 @@ QT_END_NAMESPACE
QFAIL(qPrintable(errorMsg)); \
} while (0);
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
static void setupSslServer(QSslSocket* serverSocket)
{
QString testDataDir = QFileInfo(QFINDTESTDATA("rfc3252.txt")).absolutePath();
@@ -504,7 +504,7 @@ protected:
client->setSocketDescriptor(socketDescriptor);
connectSocketSignals();
} else {
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QSslSocket *serverSocket = new QSslSocket;
serverSocket->setParent(this);
if (serverSocket->setSocketDescriptor(socketDescriptor)) {
@@ -541,7 +541,7 @@ private:
}
private slots:
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void slotSslErrors(const QList<QSslError>& errors)
{
qDebug() << "slotSslErrors" << client->errorString() << errors;
@@ -820,7 +820,7 @@ public:
}
virtual void incomingConnection(qintptr socketDescriptor)
{
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
if (doSsl) {
QSslSocket *serverSocket = new QSslSocket;
serverSocket->setParent(this);
@@ -837,7 +837,7 @@ public:
}
private slots:
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void slotSslErrors(const QList<QSslError>& errors)
{
qDebug() << "slotSslErrors" << sslSocket->errorString() << errors;
@@ -1104,7 +1104,7 @@ tst_QNetworkReply::tst_QNetworkReply()
qRegisterMetaType<QNetworkReply *>(); // for QSignalSpy
qRegisterMetaType<QAuthenticator *>();
qRegisterMetaType<QNetworkProxy>();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
qRegisterMetaType<QList<QSslError> >();
#endif
qRegisterMetaType<QNetworkReply::NetworkError>();
@@ -1150,7 +1150,7 @@ void tst_QNetworkReply::proxyAuthenticationRequired(const QNetworkProxy &, QAuth
auth->setPassword("password");
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_QNetworkReply::sslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
{
reply->ignoreSslErrors();
@@ -1345,7 +1345,7 @@ void tst_QNetworkReply::initTestCase()
#endif
QDir::setSearchPaths("testdata", QStringList() << testDataDir);
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QSslSocket::defaultCaCertificates(); //preload certificates
#endif
#ifndef QT_NO_BEARERMANAGEMENT
@@ -3135,7 +3135,7 @@ void tst_QNetworkReply::ioGetFromHttpWithSocksProxy()
}
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_QNetworkReply::ioGetFromHttpsWithSslErrors()
{
qRegisterMetaType<QNetworkReply*>(); // for QSignalSpy
@@ -3559,7 +3559,7 @@ void tst_QNetworkReply::ioGetWithManyProxies_data()
<< "ftp://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"
<< QNetworkReply::NoError;
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
// HTTPS with HTTP transparent proxy
proxyList.clear();
proxyList << QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3129);
@@ -3604,7 +3604,7 @@ void tst_QNetworkReply::ioGetWithManyProxies_data()
<< "ftp://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"
<< QNetworkReply::ProxyNotFoundError;
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
// HTTPS with HTTP caching proxy
proxyList.clear();
proxyList << QNetworkProxy(QNetworkProxy::HttpCachingProxy, QtNetworkSettings::serverName(), 3129);
@@ -3679,7 +3679,7 @@ void tst_QNetworkReply::ioGetWithManyProxies_data()
<< "ftp://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"
<< QNetworkReply::NoError;
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
// HTTPS request with HTTP Caching + HTTP transparent
proxyList.clear();
proxyList << QNetworkProxy(QNetworkProxy::HttpCachingProxy, QtNetworkSettings::serverName(), 3129)
@@ -3726,7 +3726,7 @@ void tst_QNetworkReply::ioGetWithManyProxies()
QSignalSpy authspy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
connect(&manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
#endif
@@ -3735,7 +3735,7 @@ void tst_QNetworkReply::ioGetWithManyProxies()
manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
manager.disconnect(SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
this, SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
#endif
@@ -4324,7 +4324,7 @@ void tst_QNetworkReply::ioPostToHttpNoBufferFlag()
QCOMPARE(reply->error(), QNetworkReply::ContentReSendError);
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
class SslServer : public QTcpServer {
Q_OBJECT
public:
@@ -4437,7 +4437,7 @@ void tst_QNetworkReply::ioGetFromBuiltinHttp_data()
QTest::addColumn<int>("bufferSize");
QTest::newRow("http+unlimited") << false << 0;
QTest::newRow("http+limited") << false << 4096;
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QTest::newRow("https+unlimited") << true << 0;
QTest::newRow("https+limited") << true << 4096;
#endif
@@ -5123,7 +5123,7 @@ void tst_QNetworkReply::httpProxyCommands_data()
<< QUrl("http://0.0.0.0:4443/http-request")
<< QByteArray("HTTP/1.0 200 OK\r\nProxy-Connection: close\r\nContent-Length: 1\r\n\r\n1")
<< "GET http://0.0.0.0:4443/http-request HTTP/1.";
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QTest::newRow("https")
<< QUrl("https://0.0.0.0:4443/https-request")
<< QByteArray("HTTP/1.0 200 Connection Established\r\n\r\n")
@@ -5539,7 +5539,7 @@ void tst_QNetworkReply::httpRecursiveCreation()
QVERIFY(!QTestEventLoop::instance().timeout());
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_QNetworkReply::ignoreSslErrorsList_data()
{
QTest::addColumn<QString>("url");
@@ -5637,7 +5637,7 @@ void tst_QNetworkReply::sslConfiguration()
QCOMPARE(reply->error(), expectedError);
}
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
void tst_QNetworkReply::getAndThenDeleteObject_data()
{
@@ -6071,7 +6071,7 @@ void tst_QNetworkReply::authenticationCacheAfterCancel_data()
QTest::addColumn<QUrl>("url");
for (int i = 0; i < proxies.count(); ++i) {
QTest::newRow("http" + proxies.at(i).tag) << proxies.at(i).proxy << proxies.at(i).requiresAuthentication << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt");
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QTest::newRow("https" + proxies.at(i).tag) << proxies.at(i).proxy << proxies.at(i).requiresAuthentication << QUrl("https://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt");
#endif
}
@@ -6124,7 +6124,7 @@ void tst_QNetworkReply::authenticationCacheAfterCancel()
QFETCH(bool, proxyAuth);
QFETCH(QUrl, url);
QNetworkAccessManager manager;
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
connect(&manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
#endif
@@ -6251,7 +6251,7 @@ void tst_QNetworkReply::authenticationWithDifferentRealm()
{
AuthenticationCacheHelper helper;
QNetworkAccessManager manager;
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
connect(&manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
#endif
@@ -6436,7 +6436,7 @@ void tst_QNetworkReply::synchronousRequest_data()
// ### we would need to enflate (un-deflate) the file content and compare the sizes
<< QString("text/plain");
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QTest::newRow("https")
<< QUrl("https://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt")
<< QString("file:" + testDataDir + "/rfc3252.txt")
@@ -6467,7 +6467,7 @@ void tst_QNetworkReply::synchronousRequest()
QNetworkRequest request(url);
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
// workaround for HTTPS requests: add self-signed server cert to list of CA certs,
// since we cannot react to the sslErrors() signal
// to fix this properly we would need to have an ignoreSslErrors() method in the
@@ -6512,7 +6512,7 @@ void tst_QNetworkReply::synchronousRequest()
reply->deleteLater();
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_QNetworkReply::synchronousRequestSslFailure()
{
// test that SSL won't be accepted with self-signed certificate,
diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
index abeb1ed06d..2c2b551257 100644
--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
@@ -68,7 +68,7 @@
#include <QStringList>
#include <QTcpServer>
#include <QTcpSocket>
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
#include <QSslSocket>
#endif
#include <QTextStream>
@@ -332,7 +332,7 @@ void tst_QTcpSocket::initTestCase_data()
QTest::newRow("WithHttpProxyBasicAuth") << true << int(HttpProxy | AuthBasic) << false;
// QTest::newRow("WithHttpProxyNtlmAuth") << true << int(HttpProxy | AuthNtlm) << false;
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QTest::newRow("WithoutProxy SSL") << false << 0 << true;
QTest::newRow("WithSocks5Proxy SSL") << true << int(Socks5Proxy) << true;
QTest::newRow("WithSocks5AuthProxy SSL") << true << int(Socks5Proxy | AuthBasic) << true;
@@ -392,7 +392,7 @@ void tst_QTcpSocket::init()
QTcpSocket *tst_QTcpSocket::newSocket() const
{
QTcpSocket *socket;
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QFETCH_GLOBAL(bool, ssl);
socket = ssl ? new QSslSocket : new QTcpSocket;
#else
@@ -1640,7 +1640,7 @@ public:
protected:
inline void run()
{
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QFETCH_GLOBAL(bool, ssl);
if (ssl)
socket = new QSslSocket;
@@ -1924,7 +1924,7 @@ public:
attemptedToConnect = false;
networkTimeout = false;
count = 0;
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QFETCH_GLOBAL(bool, ssl);
if (ssl)
sock = new QSslSocket;
diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
index da2dd989c7..5da9ff0476 100644
--- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
@@ -66,7 +66,7 @@ class tst_QSslCertificate : public QObject
QMap<QString, QString> sha1Map;
void createTestRows();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void compareCertificates(const QSslCertificate & cert1, const QSslCertificate & cert2);
#endif
@@ -76,7 +76,7 @@ public slots:
void initTestCase();
void cleanupTestCase();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
private slots:
void emptyConstructor();
void constructor_data();
@@ -173,7 +173,7 @@ static QByteArray readFile(const QString &absFilePath)
return file.readAll();
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_QSslCertificate::emptyConstructor()
{
@@ -1060,7 +1060,7 @@ void tst_QSslCertificate::extensions()
}
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
QTEST_MAIN(tst_QSslCertificate)
#include "tst_qsslcertificate.moc"
diff --git a/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp b/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp
index 25d5f00e95..52f603d3c6 100644
--- a/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp
+++ b/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp
@@ -59,7 +59,7 @@ public slots:
void init();
void cleanup();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
private slots:
void constructing();
@@ -88,14 +88,14 @@ void tst_QSslCipher::cleanup()
{
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_QSslCipher::constructing()
{
QSslCipher cipher;
}
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
QTEST_MAIN(tst_QSslCipher)
#include "tst_qsslcipher.moc"
diff --git a/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp b/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp
index e57c5fa7f4..bf5ae9c35b 100644
--- a/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp
+++ b/tests/auto/network/ssl/qsslerror/tst_qsslerror.cpp
@@ -77,7 +77,7 @@ public slots:
void init();
void cleanup();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
private slots:
void constructing();
#endif
@@ -109,14 +109,14 @@ void tst_QSslError::cleanup()
{
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_QSslError::constructing()
{
QSslError error;
}
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
QTEST_MAIN(tst_QSslError)
#include "tst_qsslerror.moc"
diff --git a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
index e8941a2642..ed3deb49ec 100644
--- a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
+++ b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp
@@ -71,7 +71,7 @@ class tst_QSslKey : public QObject
public slots:
void initTestCase();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
private slots:
void emptyConstructor();
@@ -123,7 +123,7 @@ static QByteArray readFile(const QString &absFilePath)
return file.readAll();
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_QSslKey::emptyConstructor()
{
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index 83060e27e4..cdb397ccd4 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -55,7 +55,7 @@
#include <QAuthenticator>
#include "private/qhostinfo_p.h"
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
#include "private/qsslsocket_openssl_p.h"
#include "private/qsslsocket_openssl_symbols_p.h"
#include "private/qsslconfiguration_p.h"
@@ -65,7 +65,7 @@
Q_DECLARE_METATYPE(QAbstractSocket::SocketState)
Q_DECLARE_METATYPE(QAbstractSocket::SocketError)
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
Q_DECLARE_METATYPE(QSslSocket::SslMode)
typedef QList<QSslError::SslError> SslErrorList;
Q_DECLARE_METATYPE(SslErrorList)
@@ -80,7 +80,7 @@ Q_DECLARE_METATYPE(QSslConfiguration)
#define QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
#endif
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
class QSslSocketPtr: public QSharedPointer<QSslSocket>
{
public:
@@ -113,7 +113,7 @@ public:
return QTestEventLoop::instance().timeout();
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QSslSocketPtr newSocket();
#endif
@@ -124,7 +124,7 @@ public slots:
void cleanup();
void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth);
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
private slots:
void constructing();
void simpleConnect();
@@ -226,7 +226,7 @@ protected slots:
private:
QSslSocket *socket;
QList<QSslError> storedExpectedSslErrors;
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
private:
static int loopLevel;
};
@@ -235,7 +235,7 @@ int tst_QSslSocket::loopLevel = 0;
tst_QSslSocket::tst_QSslSocket()
{
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
qRegisterMetaType<QList<QSslError> >("QList<QSslError>");
qRegisterMetaType<QSslError>("QSslError");
qRegisterMetaType<QAbstractSocket::SocketState>("QAbstractSocket::SocketState");
@@ -320,7 +320,7 @@ void tst_QSslSocket::cleanup()
QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy);
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QSslSocketPtr tst_QSslSocket::newSocket()
{
QSslSocket *socket = new QSslSocket;
@@ -341,7 +341,7 @@ void tst_QSslSocket::proxyAuthenticationRequired(const QNetworkProxy &, QAuthent
auth->setPassword("password");
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_QSslSocket::constructing()
{
@@ -2216,7 +2216,7 @@ void tst_QSslSocket::setEmptyDefaultConfiguration() // this test should be last,
QVERIFY2(!socket->waitForEncrypted(4000), qPrintable(socket->errorString()));
}
-#endif // QT_NO_OPENSSL
+#endif // QT_NO_SSL
QTEST_MAIN(tst_QSslSocket)
diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp
index 99d4ac9522..841df6e1f0 100644
--- a/tests/auto/other/networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/other/networkselftest/tst_networkselftest.cpp
@@ -80,7 +80,7 @@ private slots:
void httpServerFiles();
void httpServerCGI_data();
void httpServerCGI();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void httpsServer();
#endif
void httpProxy();
@@ -188,14 +188,14 @@ static bool doSocketRead(QTcpSocket *socket, int minBytesAvailable, int timeout
static bool doSocketFlush(QTcpSocket *socket, int timeout = 4000)
{
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QSslSocket *sslSocket = qobject_cast<QSslSocket *>(socket);
#endif
QTime timer;
timer.start();
forever {
if (socket->bytesToWrite() == 0
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
&& sslSocket->encryptedBytesToWrite() == 0
#endif
)
@@ -210,7 +210,7 @@ static bool doSocketFlush(QTcpSocket *socket, int timeout = 4000)
static void netChat(int port, const QList<Chat> &chat)
{
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QSslSocket socket;
#else
QTcpSocket socket;
@@ -322,7 +322,7 @@ static void netChat(int port, const QList<Chat> &chat)
break;
case Chat::StartEncryption:
-#ifdef QT_NO_OPENSSL
+#ifdef QT_NO_SSL
QFAIL("Internal error: SSL required for this test");
#else
qDebug() << i << "Starting client encryption";
@@ -745,7 +745,7 @@ void tst_NetworkSelfTest::httpServerCGI()
netChat(80, chat);
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_NetworkSelfTest::httpsServer()
{
netChat(443, QList<Chat>()
@@ -937,7 +937,7 @@ void tst_NetworkSelfTest::socks5ProxyAuth()
void tst_NetworkSelfTest::supportsSsl()
{
-#ifdef QT_NO_OPENSSL
+#ifdef QT_NO_SSL
QFAIL("SSL not compiled in");
#else
QVERIFY2(QSslSocket::supportsSsl(), "Could not load SSL libraries");
diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 829bba5c5d..fe9efa55b7 100644
--- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -457,7 +457,7 @@ private slots:
void initTestCase();
void httpLatency();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void echoPerformance_data();
void echoPerformance();
#endif
@@ -491,7 +491,7 @@ void tst_qnetworkreply::httpLatency()
}
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_qnetworkreply::echoPerformance_data()
{
QTest::addColumn<bool>("ssl");
diff --git a/tests/manual/qnetworkreply/main.cpp b/tests/manual/qnetworkreply/main.cpp
index 69bc0ef5be..1f2710e182 100644
--- a/tests/manual/qnetworkreply/main.cpp
+++ b/tests/manual/qnetworkreply/main.cpp
@@ -100,7 +100,7 @@ void tst_qnetworkreply::limiting_data()
QTest::addColumn<QUrl>("url");
QTest::newRow("HTTP") << QUrl("http://" + QtNetworkSettings::serverName() + "/mediumfile");
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QTest::newRow("HTTP+SSL") << QUrl("https://" + QtNetworkSettings::serverName() + "/mediumfile");
#endif