summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2021-05-28 11:33:57 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2021-06-03 20:08:32 +0200
commitfd217e7f005d1825d95d73a15a075703bb6346c6 (patch)
tree4a5170b0987c14c98387d31d9f698a6f421042bb /tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp
parent7920c03ff1954355d588baa466820a60afc9b587 (diff)
QDtls(Cookie) autotests - use the proper API to detect DTLS support
Instead of relying on some string comparisons and the current knowledge of which backend supports DTLS, use the proper API we already have in place to test if a particular class is supported by the active backend. Change-Id: I58ca0f7b7fcef68ec375cd64b83e51d4335817da Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp')
-rw-r--r--tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp b/tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp
index 18efc82491..42b51ad413 100644
--- a/tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp
+++ b/tests/auto/network/ssl/qdtlscookie/tst_qdtlscookie.cpp
@@ -141,7 +141,10 @@ QHostAddress tst_QDtlsCookie::toNonAny(const QHostAddress &addr)
void tst_QDtlsCookie::initTestCase()
{
- if (!TlsAux::activeBackendSupportsDtls())
+ using TlsCl = QSsl::ImplementedClass;
+ using TlsAux::classImplemented;
+
+ if (!classImplemented(TlsCl::DtlsCookie) || !classImplemented(TlsCl::Dtls))
QSKIP("The active TLS backend does not support DTLS");
QVERIFY(noiseMaker.bind());