From 0ffb4257258df236dc469ef086b1871fe7b5afba Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 8 Oct 2008 20:40:40 +0000 Subject: Many improvements towards getting the CVC implementation from InSiTo compiling against mainline. Add several missing classes extracted from other files inside InSiTo. Add dependency note for ecdsa and asn1 --- src/cert/cvc/cvc_gen_cert.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 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 7a9ac86fa..7da99f197 100644 --- a/src/cert/cvc/cvc_gen_cert.h +++ b/src/cert/cvc/cvc_gen_cert.h @@ -8,10 +8,12 @@ #define BOTAN_EAC_CVC_GCERT_H__ #include +#include #include #include #include #include +#include namespace Botan { @@ -77,7 +79,8 @@ class EAC1_1_gen_CVC : public EAC1_1_obj // CRTP continuation from EAC1 */ static MemoryVector make_signed( std::auto_ptr signer, - const MemoryRegion& tbs_bits); + const MemoryRegion& tbs_bits, + RandomNumberGenerator& rng); virtual ~EAC1_1_gen_CVC() {} @@ -93,9 +96,10 @@ template bool EAC1_1_gen_CVC::is_self_signed() const } template MemoryVector EAC1_1_gen_CVC::make_signed( std::auto_ptr signer, - const MemoryRegion& tbs_bits) // static + const MemoryRegion& tbs_bits, + RandomNumberGenerator& rng) // static { - SecureVector concat_sig = EAC1_1_obj::make_signature(signer, tbs_bits); + SecureVector concat_sig = EAC1_1_obj::make_signature(signer.get(), tbs_bits, rng); assert(concat_sig.size() % 2 == 0); return DER_Encoder() .start_cons(ASN1_Tag(33), APPLICATION) @@ -144,14 +148,14 @@ void EAC1_1_gen_CVC::decode_info( ECDSA_Signature & res_sig) { SecureVector concat_sig; - BER_Decoder(source.get_shared()) + BER_Decoder(*source.get_shared().get()) .start_cons(ASN1_Tag(33)) .start_cons(ASN1_Tag(78)) .raw_bytes(res_tbs_bits) .end_cons() .decode(concat_sig, OCTET_STRING, ASN1_Tag(55), APPLICATION) .end_cons(); - res_sig = ecdsa::decode_concatenation(concat_sig); + res_sig = decode_concatenation(concat_sig); } } -- cgit v1.2.3