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/eac_obj.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/cert/cvc/eac_obj.h') diff --git a/src/cert/cvc/eac_obj.h b/src/cert/cvc/eac_obj.h index 04afd7e59..b41b78b2c 100644 --- a/src/cert/cvc/eac_obj.h +++ b/src/cert/cvc/eac_obj.h @@ -54,7 +54,7 @@ class BOTAN_DLL EAC1_1_obj : public EAC_Signed_Object protected: void init(SharedPtrConverter in); - static SecureVector make_signature(PK_Signer* signer, + static SecureVector make_signature(PK_Signer& signer, const MemoryRegion& tbs_bits, RandomNumberGenerator& rng); @@ -68,12 +68,12 @@ template SecureVector EAC1_1_obj::get_concat_si } template SecureVector -EAC1_1_obj::make_signature(PK_Signer* signer, +EAC1_1_obj::make_signature(PK_Signer& signer, const MemoryRegion& tbs_bits, RandomNumberGenerator& rng) { // this is the signature as a der sequence - SecureVector seq_sig = signer->sign_message(tbs_bits, rng); + SecureVector seq_sig = signer.sign_message(tbs_bits, rng); ECDSA_Signature sig(decode_seq(seq_sig)); SecureVector concat_sig(sig.get_concatenation()); @@ -112,12 +112,12 @@ bool EAC1_1_obj::check_signature(Public_Key& pub_key) const if(!dynamic_cast(&pub_key)) return false; - std::auto_ptr enc(new ECDSA_Signature_Encoder(&m_sig)); + std::unique_ptr enc(new ECDSA_Signature_Encoder(&m_sig)); SecureVector seq_sig = enc->signature_bits(); SecureVector to_sign = tbs_data(); PK_Verifying_wo_MR_Key& sig_key = dynamic_cast(pub_key); - std::auto_ptr verifier(get_pk_verifier(sig_key, padding, format)); + std::unique_ptr verifier(get_pk_verifier(sig_key, padding, format)); return verifier->verify_message(to_sign, seq_sig); } catch(...) -- cgit v1.2.3