aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRené Korthaus <[email protected]>2017-07-01 22:36:03 +0200
committerRené Korthaus <[email protected]>2017-07-01 22:36:03 +0200
commite6095ff921eb476424dc28caabd45fc8f334a5c9 (patch)
tree19bbd5b797074767e8b2b5ea0405594d7f27eb7c
parentb3ca3bb085bf5f90f1a6f07a5b9d80c931688654 (diff)
Fix sign_cert CLI incorrectly handling --ca-key-pass
-rw-r--r--src/cli/x509.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cli/x509.cpp b/src/cli/x509.cpp
index e2163b987..0094fef2b 100644
--- a/src/cli/x509.cpp
+++ b/src/cli/x509.cpp
@@ -1,5 +1,6 @@
/*
* (C) 2010,2014,2015 Jack Lloyd
+* (C) 2017 René Korthaus, Rohde & Schwarz Cybersecurity
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
@@ -32,10 +33,11 @@ class Sign_Cert final : public Command
{
Botan::X509_Certificate ca_cert(get_arg("ca_cert"));
std::unique_ptr<Botan::PKCS8_PrivateKey> key;
+ const std::string pass = get_arg("ca-key-pass");
- if(flag_set("ca_key_pass"))
+ if(!pass.empty())
{
- key.reset(Botan::PKCS8::load_key(get_arg("ca_key"), rng(), get_arg("ca_key_pass")));
+ key.reset(Botan::PKCS8::load_key(get_arg("ca_key"), rng(), pass));
}
else
{