Make sure we have initialized QCA before using it
QCA::isSupported uses a private global object that is 0 if QCA::Initializer is not instanciated.
This commit is contained in:
parent
994057af0e
commit
a0ff36625d
1 changed files with 1 additions and 1 deletions
|
@ -91,6 +91,7 @@ void NetworkPackageTests::networkPackageIdentityTest()
|
|||
|
||||
void NetworkPackageTests::networkPackageEncryptionTest()
|
||||
{
|
||||
QCA::Initializer init;
|
||||
if(!QCA::isSupported("rsa")) {
|
||||
QFAIL("RSA isn't supported by your QCA. ");
|
||||
return;
|
||||
|
@ -105,7 +106,6 @@ void NetworkPackageTests::networkPackageEncryptionTest()
|
|||
|
||||
NetworkPackage decrypted("");
|
||||
|
||||
QCA::Initializer init;
|
||||
QCA::PrivateKey privateKey = QCA::KeyGenerator().createRSA(2048);
|
||||
QVERIFY(!privateKey.isNull());
|
||||
QCA::PublicKey publicKey = privateKey.toPublicKey();
|
||||
|
|
Loading…
Reference in a new issue