From 57906d1135521f2b31d81fce26d403621d3d5523 Mon Sep 17 00:00:00 2001 From: Matthias Gierlings Date: Sat, 17 Aug 2019 12:53:55 +0200 Subject: Updates private key prior to signature output --- src/cli/pubkey.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cli/pubkey.cpp b/src/cli/pubkey.cpp index 8d442b75c..74ffde906 100644 --- a/src/cli/pubkey.cpp +++ b/src/cli/pubkey.cpp @@ -1,5 +1,6 @@ /* -* (C) 2010,2014,2015 Jack Lloyd +* (C) 2010,2014,2015,2019 Jack Lloyd +* (C) 2019 Matthias Gierlings * (C) 2015 René Korthaus * * Botan is released under the Simplified BSD License (see license.txt) @@ -216,7 +217,7 @@ class PK_Sign final : public Command }; this->read_file(get_arg("file"), onData); - output() << Botan::base64_encode(signer.signature(rng())) << "\n"; + std::vector sig { signer.signature(rng()) }; if(key->stateful_operation()) { @@ -226,6 +227,8 @@ class PK_Sign final : public Command else updated_key << Botan::PKCS8::PEM_encode(*key, rng(), passphrase); } + + output() << Botan::base64_encode(sig) << "\n"; } }; -- cgit v1.2.3