diff options
author | lloyd <[email protected]> | 2011-02-10 22:51:11 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-02-10 22:51:11 +0000 |
commit | 5f4f1294b1cf1784f4fd14840a9e0824f4fa8742 (patch) | |
tree | 3cdedbe87099c18e289bc140bef69e86dddf8b8d /src/cert/cvc | |
parent | f49d55a1e4bcd3e33ba8eee6afa92438ef61f0b3 (diff) |
Remove inclusions of unused headers.
Avoid using auto_ptr in the CVC headers.
Diffstat (limited to 'src/cert/cvc')
-rw-r--r-- | src/cert/cvc/cvc_gen_cert.h | 7 | ||||
-rw-r--r-- | src/cert/cvc/cvc_self.cpp | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/cert/cvc/cvc_gen_cert.h b/src/cert/cvc/cvc_gen_cert.h index 61861df41..ad61b85bf 100644 --- a/src/cert/cvc/cvc_gen_cert.h +++ b/src/cert/cvc/cvc_gen_cert.h @@ -13,7 +13,6 @@ #include <botan/eac_asn_obj.h> #include <botan/ecdsa.h> #include <botan/pubkey.h> -#include <memory> namespace Botan { @@ -31,7 +30,7 @@ class EAC1_1_gen_CVC : public EAC1_1_obj<Derived> // CRTP continuation from EAC1 * Get this certificates public key. * @result this certificates public key */ - std::auto_ptr<Public_Key> subject_public_key() const; + Public_Key* subject_public_key() const; /** * Find out whether this object is self signed. @@ -121,9 +120,9 @@ MemoryVector<byte> EAC1_1_gen_CVC<Derived>::make_signed( } template<typename Derived> -std::auto_ptr<Public_Key> EAC1_1_gen_CVC<Derived>::subject_public_key() const +Public_Key* EAC1_1_gen_CVC<Derived>::subject_public_key() const { - return std::auto_ptr<Public_Key>(new ECDSA_PublicKey(*m_pk)); + return new ECDSA_PublicKey(*m_pk); } template<typename Derived> SecureVector<byte> EAC1_1_gen_CVC<Derived>::build_cert_body(MemoryRegion<byte> const& tbs) diff --git a/src/cert/cvc/cvc_self.cpp b/src/cert/cvc/cvc_self.cpp index f1d539923..1097d45d1 100644 --- a/src/cert/cvc/cvc_self.cpp +++ b/src/cert/cvc/cvc_self.cpp @@ -11,6 +11,7 @@ #include <botan/time.h> #include <botan/oids.h> #include <sstream> +#include <memory> namespace Botan { @@ -231,7 +232,7 @@ EAC1_1_CVC link_cvca(EAC1_1_CVC const& signer, AlgorithmIdentifier sig_algo = signer.signature_algorithm(); std::string padding_and_hash = padding_and_hash_from_oid(sig_algo.oid); PK_Signer pk_signer(*priv_key, padding_and_hash); - std::auto_ptr<Public_Key> pk = signee.subject_public_key(); + std::auto_ptr<Public_Key> pk(signee.subject_public_key()); ECDSA_PublicKey* subj_pk = dynamic_cast<ECDSA_PublicKey*>(pk.get()); subj_pk->set_parameter_encoding(EC_DOMPAR_ENC_EXPLICIT); @@ -265,9 +266,9 @@ EAC1_1_CVC sign_request(EAC1_1_CVC const& signer_cert, ASN1_Chr chr(chr_str); std::string padding_and_hash = padding_and_hash_from_oid(signee.signature_algorithm().oid); PK_Signer pk_signer(*priv_key, padding_and_hash); - std::auto_ptr<Public_Key> pk = signee.subject_public_key(); + std::auto_ptr<Public_Key> pk(signee.subject_public_key()); ECDSA_PublicKey* subj_pk = dynamic_cast<ECDSA_PublicKey*>(pk.get()); - std::auto_ptr<Public_Key> signer_pk = signer_cert.subject_public_key(); + std::auto_ptr<Public_Key> signer_pk(signer_cert.subject_public_key()); // for the case that the domain parameters are not set... // (we use those from the signer because they must fit) |