diff options
author | lloyd <[email protected]> | 2009-09-30 18:03:46 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-09-30 18:03:46 +0000 |
commit | ce2c86429a5b69ff059205f348732b7fbf4eafc8 (patch) | |
tree | d9389731c8a6cbd7c3dc6b6082ea598459cfdb12 /src/pubkey/ecdsa | |
parent | 59b4eb0bd2d1b9d65c3921f5205a012f1a98fdf8 (diff) | |
parent | d5c7febf558af0f7a6f0edf3595d55fe04dce0f5 (diff) |
propagate from branch 'net.randombit.botan' (head 8a5eb02c2e451fc983f234f7ba2f023f5a7d294f)
to branch 'net.randombit.botan.c++0x' (head e18cd411269e15638df3298d6a4165446e7ca529)
Diffstat (limited to 'src/pubkey/ecdsa')
-rw-r--r-- | src/pubkey/ecdsa/ecdsa.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/pubkey/ecdsa/ecdsa.cpp b/src/pubkey/ecdsa/ecdsa.cpp index ea2c35a19..4cabf5e5b 100644 --- a/src/pubkey/ecdsa/ecdsa.cpp +++ b/src/pubkey/ecdsa/ecdsa.cpp @@ -19,7 +19,7 @@ namespace Botan { ECDSA_PrivateKey::ECDSA_PrivateKey(RandomNumberGenerator& rng, const EC_Domain_Params& dom_pars) { - mp_dom_pars = std::auto_ptr<EC_Domain_Params>(new EC_Domain_Params(dom_pars)); + mp_dom_pars = std::unique_ptr<EC_Domain_Params>(new EC_Domain_Params(dom_pars)); generate_private_key(rng); try @@ -67,11 +67,10 @@ void ECDSA_PublicKey::set_domain_parameters(const EC_Domain_Params& dom_pars) throw Invalid_State("EC_PublicKey::set_domain_parameters(): point does not lie on provided curve"); } - std::auto_ptr<EC_Domain_Params> p_tmp_pars(new EC_Domain_Params(dom_pars)); - ECDSA_Core tmp_ecdsa_core(*p_tmp_pars, BigInt(0), tmp_pp); + mp_dom_pars.reset(new EC_Domain_Params(dom_pars)); + ECDSA_Core tmp_ecdsa_core(*mp_dom_pars, BigInt(0), tmp_pp); mp_public_point.reset(new PointGFp(tmp_pp)); m_ecdsa_core = tmp_ecdsa_core; - mp_dom_pars = p_tmp_pars; } void ECDSA_PublicKey::set_all_values(const ECDSA_PublicKey& other) @@ -130,8 +129,8 @@ bool ECDSA_PublicKey::verify(const byte message[], ECDSA_PublicKey::ECDSA_PublicKey(const EC_Domain_Params& dom_par, const PointGFp& public_point) { - mp_dom_pars = std::auto_ptr<EC_Domain_Params>(new EC_Domain_Params(dom_par)); - mp_public_point = std::auto_ptr<PointGFp>(new PointGFp(public_point)); + mp_dom_pars = std::unique_ptr<EC_Domain_Params>(new EC_Domain_Params(dom_par)); + mp_public_point = std::unique_ptr<PointGFp>(new PointGFp(public_point)); m_param_enc = ENC_EXPLICIT; m_ecdsa_core = ECDSA_Core(*mp_dom_pars, BigInt(0), *mp_public_point); } |