diff options
Diffstat (limited to 'Swiften/QA')
-rw-r--r-- | Swiften/QA/TLSTest/CertificateTest.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Swiften/QA/TLSTest/CertificateTest.cpp b/Swiften/QA/TLSTest/CertificateTest.cpp index 2fa4c04..2089732 100644 --- a/Swiften/QA/TLSTest/CertificateTest.cpp +++ b/Swiften/QA/TLSTest/CertificateTest.cpp @@ -42,41 +42,41 @@ class CertificateTest : public CppUnit::TestFixture { } void testConstructFromDER() { - Certificate::ref testling = certificateFactory->createCertificateFromDER(certificateData); + Certificate::ref testling = Certificate::ref(certificateFactory->createCertificateFromDER(certificateData)); CPPUNIT_ASSERT_EQUAL(std::string("*.jabber.org"), testling->getCommonNames()[0]); } void testToDER() { - Certificate::ref testling = certificateFactory->createCertificateFromDER(certificateData); + Certificate::ref testling = Certificate::ref(certificateFactory->createCertificateFromDER(certificateData)); CPPUNIT_ASSERT_EQUAL(certificateData, testling->toDER()); } /* void testGetSubjectName() { - Certificate::ref testling = certificateFactory->createCertificateFromDER(certificateData); + Certificate::ref testling = Certificate::ref(certificateFactory->createCertificateFromDER(certificateData); CPPUNIT_ASSERT_EQUAL(std::string("/description=114072-VMk8pdi1aj5kTXxO/C=US/ST=Colorado/L=Denver/O=Peter Saint-Andre/OU=StartCom Trusted Certificate Member/CN=*.jabber.org/emailAddress=hostmaster@jabber.org"), testling->getSubjectName()); } */ void testGetCommonNames() { - Certificate::ref testling = certificateFactory->createCertificateFromDER(certificateData); + Certificate::ref testling = Certificate::ref(certificateFactory->createCertificateFromDER(certificateData)); CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(testling->getCommonNames().size())); CPPUNIT_ASSERT_EQUAL(std::string("*.jabber.org"), testling->getCommonNames()[0]); } void testGetSRVNames() { - Certificate::ref testling = certificateFactory->createCertificateFromDER(certificateData); + Certificate::ref testling = Certificate::ref(certificateFactory->createCertificateFromDER(certificateData)); CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(testling->getSRVNames().size())); CPPUNIT_ASSERT_EQUAL(std::string("*.jabber.org"), testling->getSRVNames()[0]); } void testGetDNSNames() { - Certificate::ref testling = certificateFactory->createCertificateFromDER(certificateData); + Certificate::ref testling = Certificate::ref(certificateFactory->createCertificateFromDER(certificateData)); CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(testling->getDNSNames().size())); CPPUNIT_ASSERT_EQUAL(std::string("*.jabber.org"), testling->getDNSNames()[0]); @@ -84,7 +84,7 @@ class CertificateTest : public CppUnit::TestFixture { } void testGetXMPPAddresses() { - Certificate::ref testling = certificateFactory->createCertificateFromDER(certificateData); + Certificate::ref testling = Certificate::ref(certificateFactory->createCertificateFromDER(certificateData)); CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(testling->getXMPPAddresses().size())); CPPUNIT_ASSERT_EQUAL(std::string("*.jabber.org"), testling->getXMPPAddresses()[0]); |