summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/ssl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/network/ssl')
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp10
-rw-r--r--tests/auto/network/ssl/ssl.pro4
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index a15daf660a..82543fbc91 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -111,7 +111,9 @@ public slots:
void initTestCase();
void init();
void cleanup();
+#ifndef QT_NO_NETWORKPROXY
void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth);
+#endif
#ifndef QT_NO_SSL
private slots:
@@ -276,6 +278,7 @@ void tst_QSslSocket::init()
{
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
+#ifndef QT_NO_NETWORKPROXY
QFETCH_GLOBAL(int, proxyType);
QString fluke = QHostInfo::fromName(QtNetworkSettings::serverName()).addresses().first().toString();
QNetworkProxy proxy;
@@ -302,6 +305,9 @@ void tst_QSslSocket::init()
break;
}
QNetworkProxy::setApplicationProxy(proxy);
+#else // !QT_NO_NETWORKPROXY
+ QSKIP("No proxy support");
+#endif // QT_NO_NETWORKPROXY
}
qt_qhostinfo_clear_cache();
@@ -309,7 +315,9 @@ void tst_QSslSocket::init()
void tst_QSslSocket::cleanup()
{
+#ifndef QT_NO_NETWORKPROXY
QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy);
+#endif
}
#ifndef QT_NO_SSL
@@ -326,12 +334,14 @@ QSslSocketPtr tst_QSslSocket::newSocket()
}
#endif
+#ifndef QT_NO_NETWORKPROXY
void tst_QSslSocket::proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth)
{
++proxyAuthCalled;
auth->setUser("qsockstest");
auth->setPassword("password");
}
+#endif // !QT_NO_NETWORKPROXY
#ifndef QT_NO_SSL
diff --git a/tests/auto/network/ssl/ssl.pro b/tests/auto/network/ssl/ssl.pro
index 06f4a05241..0b8f269fac 100644
--- a/tests/auto/network/ssl/ssl.pro
+++ b/tests/auto/network/ssl/ssl.pro
@@ -12,3 +12,7 @@ contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked):
qsslsocket_onDemandCertificates_member \
qsslsocket_onDemandCertificates_static \
}
+
+winrt: SUBDIRS -= \
+ qsslsocket_onDemandCertificates_member \
+ qsslsocket_onDemandCertificates_static \