diff options
author | lloyd <[email protected]> | 2010-03-04 03:49:35 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-04 03:49:35 +0000 |
commit | fe9aa5acece6c004f2c1c1aa4b23d7c44207672f (patch) | |
tree | 56bf2fc8378d965138e29074c23f645ed5d1a947 /checks | |
parent | de89566f633d5ed807ca57a59cc1071f79fdded3 (diff) |
Add similar decoding constructors to the private keys
Diffstat (limited to 'checks')
-rw-r--r-- | checks/ecdh.cpp | 3 | ||||
-rw-r--r-- | checks/pk_bench.cpp | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/checks/ecdh.cpp b/checks/ecdh.cpp index cb3246ace..d8f8e2fad 100644 --- a/checks/ecdh.cpp +++ b/checks/ecdh.cpp @@ -176,8 +176,7 @@ void test_ecdh_cp_ctor_as_op(RandomNumberGenerator& rng) // alices key (a key constructed by domain parameters IS an ephimeral key!) Botan::ECDH_PrivateKey private_a(rng, dom_pars); Botan::ECDH_PrivateKey private_a2(private_a); - Botan::ECDH_PrivateKey private_a3; - private_a3 = private_a2; + Botan::ECDH_PrivateKey private_a3 = private_a2; Botan::ECDH_PublicKey public_a = private_a; // Bob gets this Botan::ECDH_PublicKey public_a2(public_a); diff --git a/checks/pk_bench.cpp b/checks/pk_bench.cpp index 322e643cc..4053316dc 100644 --- a/checks/pk_bench.cpp +++ b/checks/pk_bench.cpp @@ -479,7 +479,7 @@ void benchmark_dsa_nr(RandomNumberGenerator& rng, "dsa/botan/3072", NULL }; - const std::string algo_name = PRIV_KEY_TYPE().algo_name(); + std::string algo_name; for(size_t j = 0; domains[j]; j++) { @@ -499,6 +499,7 @@ void benchmark_dsa_nr(RandomNumberGenerator& rng, keygen_timer.start(); PRIV_KEY_TYPE key(rng, group); + algo_name = key.algo_name(); keygen_timer.stop(); std::auto_ptr<PK_Signer> sig(get_pk_signer(key, padding)); |