aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/speed.cpp
diff options
context:
space:
mode:
authorDaniel Neus <[email protected]>2016-01-11 21:52:38 +0100
committerDaniel Neus <[email protected]>2016-03-05 12:10:39 +0100
commitfbdc39de29a0efbcd13ad169c844189168d2110d (patch)
treeffadbfd29b164ce81a6628773a1f5f8216ab8fb6 /src/cli/speed.cpp
parent4424af469bd2bfe05b9ac1cd4e156383f23ae9e4 (diff)
cppcheck fixes: Class 'X' has a constructor with 1 argument that is not explicit.
Diffstat (limited to 'src/cli/speed.cpp')
-rw-r--r--src/cli/speed.cpp12
1 files changed, 6 insertions, 6 deletions
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);