From 327115405b0f483c2b432e2233f355a349b1f9d7 Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 1 Apr 2009 16:38:08 +0000 Subject: 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. --- src/cert/cvc/cvc_gen_cert.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/cert/cvc/cvc_gen_cert.h') diff --git a/src/cert/cvc/cvc_gen_cert.h b/src/cert/cvc/cvc_gen_cert.h index 4a788026c..8620cd89a 100644 --- a/src/cert/cvc/cvc_gen_cert.h +++ b/src/cert/cvc/cvc_gen_cert.h @@ -33,7 +33,7 @@ class BOTAN_DLL EAC1_1_gen_CVC : public EAC1_1_obj // CRTP continuation * Get this certificates public key. * @result this certificates public key */ - std::auto_ptr subject_public_key() const; + std::unique_ptr subject_public_key() const; /** * Find out whether this object is self signed. @@ -75,7 +75,7 @@ class BOTAN_DLL EAC1_1_gen_CVC : public EAC1_1_obj // CRTP continuation * @result the DER encoded signed generalized CVC object */ static MemoryVector make_signed( - std::auto_ptr signer, + PK_Signer& signer, const MemoryRegion& tbs_bits, RandomNumberGenerator& rng); virtual ~EAC1_1_gen_CVC() @@ -103,11 +103,11 @@ template bool EAC1_1_gen_CVC::is_self_signed() const } template MemoryVector EAC1_1_gen_CVC::make_signed( - std::auto_ptr signer, + PK_Signer& signer, const MemoryRegion& tbs_bits, RandomNumberGenerator& rng) // static { - SecureVector concat_sig = EAC1_1_obj::make_signature(signer.get(), tbs_bits, rng); + SecureVector concat_sig = EAC1_1_obj::make_signature(signer, tbs_bits, rng); assert(concat_sig.size() % 2 == 0); return DER_Encoder() .start_cons(ASN1_Tag(33), APPLICATION) @@ -117,9 +117,9 @@ template MemoryVector EAC1_1_gen_CVC::make_sign .get_contents(); } -template std::auto_ptr EAC1_1_gen_CVC::subject_public_key() const +template std::unique_ptr EAC1_1_gen_CVC::subject_public_key() const { - return std::auto_ptr(new ECDSA_PublicKey(m_pk)); + return std::unique_ptr(new ECDSA_PublicKey(m_pk)); } template SecureVector EAC1_1_gen_CVC::build_cert_body(MemoryRegion const& tbs) -- cgit v1.2.3