diff options
author | Jack Lloyd <[email protected]> | 2018-04-05 11:21:05 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-04-05 11:21:05 -0400 |
commit | e137dcb349a4c2e7fda71ed539361bbdefedebd1 (patch) | |
tree | 78fb2fb7ea1b935deb6a824eb2e2f7f4d6f749b1 /src/cli | |
parent | 6c5d9ef3c49658cbf4096e04905e3c0debb9d096 (diff) |
Add --provider option to sign command
Diffstat (limited to 'src/cli')
-rw-r--r-- | src/cli/pubkey.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cli/pubkey.cpp b/src/cli/pubkey.cpp index 3c84829d8..5a8cfcf44 100644 --- a/src/cli/pubkey.cpp +++ b/src/cli/pubkey.cpp @@ -144,7 +144,7 @@ BOTAN_REGISTER_COMMAND("fingerprint", PK_Fingerprint); class PK_Sign final : public Command { public: - PK_Sign() : Command("sign --der-format --passphrase= --hash=SHA-256 --emsa= key file") {} + PK_Sign() : Command("sign --der-format --passphrase= --hash=SHA-256 --emsa= --provider= key file") {} std::string group() const override { @@ -175,7 +175,9 @@ class PK_Sign final : public Command const Botan::Signature_Format format = flag_set("der-format") ? Botan::DER_SEQUENCE : Botan::IEEE_1363; - Botan::PK_Signer signer(*key, rng(), sig_padding, format); + const std::string provider = get_arg("provider"); + + Botan::PK_Signer signer(*key, rng(), sig_padding, format, provider); auto onData = [&signer](const uint8_t b[], size_t l) { |