Catch a misconfigured QCA a bit earlier.
REVIEW:120095
This commit is contained in:
parent
743f7548e0
commit
e3237881aa
1 changed files with 6 additions and 0 deletions
|
@ -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();
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue