diff options
-rw-r--r-- | src/cli/pubkey.cpp | 7 | ||||
-rwxr-xr-x | src/scripts/test_cli.py | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/cli/pubkey.cpp b/src/cli/pubkey.cpp index e90e0aa73..c28a9fa42 100644 --- a/src/cli/pubkey.cpp +++ b/src/cli/pubkey.cpp @@ -33,7 +33,7 @@ namespace Botan_CLI { class PK_Keygen final : public Command { public: - PK_Keygen() : Command("keygen --algo=RSA --params= --passphrase= --pbe= --pbe-millis=300 --der-out") {} + PK_Keygen() : Command("keygen --algo=RSA --params= --passphrase= --pbe= --pbe-millis=300 --provider= --der-out") {} std::string group() const override { @@ -49,9 +49,10 @@ class PK_Keygen final : public Command { const std::string algo = get_arg("algo"); const std::string params = get_arg("params"); + const std::string provider = get_arg("provider"); - std::unique_ptr<Botan::Private_Key> - key(Botan::create_private_key(algo, rng(), params)); + std::unique_ptr<Botan::Private_Key> key = + Botan::create_private_key(algo, rng(), params, provider); if(!key) { diff --git a/src/scripts/test_cli.py b/src/scripts/test_cli.py index 7f46c54fd..b91021823 100755 --- a/src/scripts/test_cli.py +++ b/src/scripts/test_cli.py @@ -432,7 +432,7 @@ def cli_pk_encrypt_tests(): rsa_priv_key = os.path.join(tmp_dir, 'rsa.priv') rsa_pub_key = os.path.join(tmp_dir, 'rsa.pub') - test_cli("keygen", ["--algo=RSA", "--params=2048", "--output=%s" % (rsa_priv_key)], "") + test_cli("keygen", ["--algo=RSA", "--provider=base", "--params=2048", "--output=%s" % (rsa_priv_key)], "") test_cli("pkcs8", ["--pub-out", "%s/rsa.priv" % (tmp_dir), "--output=%s" % (rsa_pub_key)], "") # Generate a random input file |