Fix Botan deprecation warning

Use the non-deprecated PK_Signer constructor overload, by explicitly
passing in our random-number generator.
This commit is contained in:
Carlo Teubner 2022-04-18 09:54:46 +01:00 committed by Jonathan White
parent 7edeceec03
commit 9bf61bfc5c

View File

@ -141,7 +141,7 @@ namespace
{ {
if (key.key->algo_name() == "RSA") { if (key.key->algo_name() == "RSA") {
try { try {
Botan::PK_Signer signer(*key.key, "EMSA3(SHA-256)"); Botan::PK_Signer signer(*key.key, *randomGen()->getRng(), "EMSA3(SHA-256)");
signer.update(reinterpret_cast<const uint8_t*>(data.constData()), data.size()); signer.update(reinterpret_cast<const uint8_t*>(data.constData()), data.size());
auto s = signer.signature(*randomGen()->getRng()); auto s = signer.signature(*randomGen()->getRng());