diff options
author | lloyd <[email protected]> | 2009-11-02 12:12:40 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-11-02 12:12:40 +0000 |
commit | b8658279904708d0690e473fb85942d5da23d2fc (patch) | |
tree | 65528378bd0089287ca0927a13a6e0a012f7bc78 /src/pubkey/ecdsa/ecdsa.cpp | |
parent | 6b617a55bd02bcc4fdb6f76af92e0cb65fd838a2 (diff) | |
parent | 92f31b22dfe2aa1b2bde84cbaf4ce7365fa4ec68 (diff) |
propagate from branch 'net.randombit.botan' (head 2773c2310e8c0a51975987a2dd6c5824c8d43882)
to branch 'net.randombit.botan.c++0x' (head f13cf5d7e89706c882604299b508f356c20aae3a)
Diffstat (limited to 'src/pubkey/ecdsa/ecdsa.cpp')
-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); } |