aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/ecc_key
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-04-01 16:38:08 +0000
committerlloyd <[email protected]>2009-04-01 16:38:08 +0000
commit327115405b0f483c2b432e2233f355a349b1f9d7 (patch)
treeced3632266c835e0d4e6a0956a959b1810812539 /src/pubkey/ecc_key
parent62b2008ec3041441a70b8396c7fabba90e42c546 (diff)
Replace the (deprecated) auto_ptr with unique_ptr.
This was mostly a s/auto_ptr/unique_ptr/, except in the CVC code and one function in ECDSA, which relied on auto_ptr's move semantics (ugh) and had to be modified in various ways.
Diffstat (limited to 'src/pubkey/ecc_key')
-rw-r--r--src/pubkey/ecc_key/ecc_key.cpp2
-rw-r--r--src/pubkey/ecc_key/ecc_key.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pubkey/ecc_key/ecc_key.cpp b/src/pubkey/ecc_key/ecc_key.cpp
index 9af63bdcd..bebfc3705 100644
--- a/src/pubkey/ecc_key/ecc_key.cpp
+++ b/src/pubkey/ecc_key/ecc_key.cpp
@@ -166,7 +166,7 @@ void EC_PrivateKey::generate_private_key(RandomNumberGenerator& rng)
BigInt tmp_private_value(0);
tmp_private_value = BigInt::random_integer(rng, 1, mp_dom_pars->get_order());
- mp_public_point = std::auto_ptr<PointGFp>( new PointGFp (mp_dom_pars->get_base_point()));
+ mp_public_point = std::unique_ptr<PointGFp>( new PointGFp (mp_dom_pars->get_base_point()));
mp_public_point->mult_this_secure(tmp_private_value,
mp_dom_pars->get_order(),
mp_dom_pars->get_order()-1);
diff --git a/src/pubkey/ecc_key/ecc_key.h b/src/pubkey/ecc_key/ecc_key.h
index 0ca9a0e75..9d5f57d9f 100644
--- a/src/pubkey/ecc_key/ecc_key.h
+++ b/src/pubkey/ecc_key/ecc_key.h
@@ -103,8 +103,8 @@ class BOTAN_DLL EC_PublicKey : public virtual Public_Key
SecureVector<byte> m_enc_public_point; // stores the public point
- std::auto_ptr<EC_Domain_Params> mp_dom_pars;
- std::auto_ptr<PointGFp> mp_public_point;
+ std::unique_ptr<EC_Domain_Params> mp_dom_pars;
+ std::unique_ptr<PointGFp> mp_public_point;
EC_dompar_enc m_param_enc;
};