diff options
author | Matthias Gierlings <[email protected]> | 2019-08-17 12:53:55 +0200 |
---|---|---|
committer | Matthias Gierlings <[email protected]> | 2019-08-17 12:53:55 +0200 |
commit | 57906d1135521f2b31d81fce26d403621d3d5523 (patch) | |
tree | 0ac325db7f78905e1b04cd8d852357d76d922f0a | |
parent | db1b06d2ee44a1bc72de3bdd4c4098cc8c149dcc (diff) |
Updates private key prior to signature output
-rw-r--r-- | src/cli/pubkey.cpp | 7 |
1 files 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<uint8_t> 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"; } }; |