diff --git a/unittest/tls/tlsunittest.cpp b/unittest/tls/tlsunittest.cpp index 5745901f..118c56bc 100644 --- a/unittest/tls/tlsunittest.cpp +++ b/unittest/tls/tlsunittest.cpp @@ -57,7 +57,7 @@ void TLSUnitTest::testCipherList() if(!QCA::isSupported("tls", QStringLiteral("qca-ossl"))) QWARN("TLS not supported for qca-ossl"); else { - QCA::TLS *tls = new QCA::TLS(QCA::TLS::Stream, nullptr, QStringLiteral("qca-ossl")); + QScopedPointer tls(new QCA::TLS(QCA::TLS::Stream, nullptr, QStringLiteral("qca-ossl"))); QStringList cipherList = tls->supportedCipherSuites(QCA::TLS::TLS_v1); QVERIFY( cipherList.contains(QStringLiteral("TLS_DHE_RSA_WITH_AES_256_CBC_SHA")) ); QVERIFY( cipherList.contains(QStringLiteral("TLS_RSA_WITH_AES_256_CBC_SHA")) );