mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-06 00:31:10 +01:00
test(Crypto): add empty password test for EVPPKey constructor
This commit is contained in:
parent
758310f304
commit
45d387d4a3
@ -518,6 +518,15 @@ void EVPTest::testECEVPSaveLoadFile()
|
|||||||
key3.save(&strPub3);
|
key3.save(&strPub3);
|
||||||
std::string pubFromPrivate = strPub3.str();
|
std::string pubFromPrivate = strPub3.str();
|
||||||
assertTrue (pubFromPrivate == pubKey);
|
assertTrue (pubFromPrivate == pubKey);
|
||||||
|
|
||||||
|
// Create new key with empty password
|
||||||
|
EVPPKey key4(curveName);
|
||||||
|
|
||||||
|
key4.save(filePub.path(), filePriv.path(), "");
|
||||||
|
|
||||||
|
// Load key from file with empty password.
|
||||||
|
// No input string should be prompted
|
||||||
|
EVPPKey key4LoadEmptyPass { "", filePriv.path(), "" };
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
std::cerr << "No elliptic curves found!" << std::endl;
|
std::cerr << "No elliptic curves found!" << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user