diff options
Diffstat (limited to 'src/cli')
-rw-r--r-- | src/cli/cli.h | 8 | ||||
-rw-r--r-- | src/cli/pubkey.cpp | 2 | ||||
-rw-r--r-- | src/cli/speed.cpp | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/cli/cli.h b/src/cli/cli.h index 890d4a630..c2609bc55 100644 --- a/src/cli/cli.h +++ b/src/cli/cli.h @@ -30,7 +30,7 @@ namespace Botan_CLI { class CLI_Error : public std::runtime_error { public: - CLI_Error(const std::string& s) : std::runtime_error(s) {} + explicit CLI_Error(const std::string& s) : std::runtime_error(s) {} }; class CLI_IO_Error : public CLI_Error @@ -43,7 +43,7 @@ class CLI_IO_Error : public CLI_Error class CLI_Usage_Error : public CLI_Error { public: - CLI_Usage_Error(const std::string& what) : CLI_Error(what) {} + explicit CLI_Usage_Error(const std::string& what) : CLI_Error(what) {} }; /* Thrown eg when a requested feature was compiled out of the library @@ -60,7 +60,7 @@ class CLI_Error_Unsupported : public CLI_Error struct CLI_Error_Invalid_Spec : public CLI_Error { public: - CLI_Error_Invalid_Spec(const std::string& spec) : + explicit CLI_Error_Invalid_Spec(const std::string& spec) : CLI_Error("Invalid command spec '" + spec + "'") {} }; @@ -106,7 +106,7 @@ class Command * Use of --help is captured in run() and returns help_text(). * Use of --verbose can be checked with verbose() or flag_set("verbose") */ - Command(const std::string& cmd_spec) : m_spec(cmd_spec) + explicit Command(const std::string& cmd_spec) : m_spec(cmd_spec) { // for checking all spec strings at load time //parse_spec(); diff --git a/src/cli/pubkey.cpp b/src/cli/pubkey.cpp index cc02e02fc..a482b6e46 100644 --- a/src/cli/pubkey.cpp +++ b/src/cli/pubkey.cpp @@ -67,7 +67,7 @@ class PK_Keygen final : public Command if(param.empty()) param = "dsa/botan/2048"; return std::unique_ptr<Botan::Private_Key>( - new Botan::DSA_PrivateKey(rng, param)); + new Botan::DSA_PrivateKey(rng, Botan::DL_Group(param))); }; #endif diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp index 568aa09dd..0ce2c0c53 100644 --- a/src/cli/speed.cpp +++ b/src/cli/speed.cpp @@ -136,7 +136,7 @@ class Timer struct Timer_Scope { public: - Timer_Scope(Timer& timer) : m_timer(timer) { m_timer.start(); } + explicit Timer_Scope(Timer& timer) : m_timer(timer) { m_timer.start(); } ~Timer_Scope() { m_timer.stop(); } private: Timer& m_timer; @@ -871,7 +871,7 @@ class Speed final : public Command Timer keygen_timer(nm, provider, "keygen"); std::unique_ptr<Botan::Private_Key> key(keygen_timer.run([&] { - return new Botan::ECDSA_PrivateKey(rng(), grp); + return new Botan::ECDSA_PrivateKey(rng(), Botan::EC_Group(grp)); })); output() << Timer::result_string_ops(keygen_timer); @@ -892,10 +892,10 @@ class Speed final : public Command Timer keygen_timer(nm, provider, "keygen"); std::unique_ptr<Botan::PK_Key_Agreement_Key> key1(keygen_timer.run([&] { - return new Botan::DH_PrivateKey(rng(), grp); + return new Botan::DH_PrivateKey(rng(), Botan::DL_Group(grp)); })); std::unique_ptr<Botan::PK_Key_Agreement_Key> key2(keygen_timer.run([&] { - return new Botan::DH_PrivateKey(rng(), grp); + return new Botan::DH_PrivateKey(rng(), Botan::DL_Group(grp)); })); output() << Timer::result_string_ops(keygen_timer); @@ -915,10 +915,10 @@ class Speed final : public Command Timer keygen_timer(nm, provider, "keygen"); std::unique_ptr<Botan::PK_Key_Agreement_Key> key1(keygen_timer.run([&] { - return new Botan::ECDH_PrivateKey(rng(), grp); + return new Botan::ECDH_PrivateKey(rng(), Botan::EC_Group(grp)); })); std::unique_ptr<Botan::PK_Key_Agreement_Key> key2(keygen_timer.run([&] { - return new Botan::ECDH_PrivateKey(rng(), grp); + return new Botan::ECDH_PrivateKey(rng(), Botan::EC_Group(grp)); })); output() << Timer::result_string_ops(keygen_timer); |