tests: yk: Initialize Crypto class

Initialize the Crypto class before running the tests as YubiKey
detection code depends on it for random data.
This commit is contained in:
Kyle Manna 2017-01-14 17:58:05 -08:00
parent a7cf39c7cd
commit 5a3ed27fed

View File

@ -21,6 +21,7 @@
#include <QTest> #include <QTest>
#include <QtConcurrentRun> #include <QtConcurrentRun>
#include "crypto/Crypto.h"
#include "keys/YkChallengeResponseKey.h" #include "keys/YkChallengeResponseKey.h"
QTEST_GUILESS_MAIN(TestYubiKeyChalResp) QTEST_GUILESS_MAIN(TestYubiKeyChalResp)
@ -44,6 +45,9 @@ void TestYubiKeyChalResp::init()
if (!result) { if (!result) {
QSKIP("Unable to connect to YubiKey", SkipAll); QSKIP("Unable to connect to YubiKey", SkipAll);
} }
/* Crypto subsystem needs to be initalized for YubiKey testing */
QVERIFY(Crypto::init());
} }
void TestYubiKeyChalResp::detectDevices() void TestYubiKeyChalResp::detectDevices()