Catch a misconfigured QCA a bit earlier.

REVIEW:120095
This commit is contained in:
Sune Vuorela 2014-09-09 09:17:25 +02:00
parent 743f7548e0
commit e3237881aa

View file

@ -91,6 +91,11 @@ void NetworkPackageTests::networkPackageIdentityTest()
void NetworkPackageTests::networkPackageEncryptionTest() void NetworkPackageTests::networkPackageEncryptionTest()
{ {
if(!QCA::isSupported("rsa")) {
QFAIL("RSA isn't supported by your QCA. ");
return;
}
NetworkPackage original("com.test"); NetworkPackage original("com.test");
original.set("hello","hola"); original.set("hello","hola");
@ -102,6 +107,7 @@ void NetworkPackageTests::networkPackageEncryptionTest()
QCA::Initializer init; QCA::Initializer init;
QCA::PrivateKey privateKey = QCA::KeyGenerator().createRSA(2048); QCA::PrivateKey privateKey = QCA::KeyGenerator().createRSA(2048);
QVERIFY(!privateKey.isNull());
QCA::PublicKey publicKey = privateKey.toPublicKey(); QCA::PublicKey publicKey = privateKey.toPublicKey();