diff options
author | lloyd <[email protected]> | 2010-02-24 13:23:12 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-02-24 13:23:12 +0000 |
commit | 27d84b179913a82849c3994e8724dbec379dab52 (patch) | |
tree | 83634362c2d0ee146ef9a2104722dc3f5491088d /src/cert/cvc/cvc_gen_cert.h | |
parent | 7424a5b5102b569e3c052cb195c98b5d1b60ce30 (diff) | |
parent | f849aab38b36c68217e98d1bfc8d8ef8f0e3c027 (diff) |
propagate from branch 'net.randombit.botan' (head 2b67727dd9d1e7fe34f3cb7b7f6715ba42a04918)
to branch 'net.randombit.botan.c++0x' (head 1e2e1596f2b4928c2b7bfba624ea5e4ac69dfdad)
Diffstat (limited to 'src/cert/cvc/cvc_gen_cert.h')
-rw-r--r-- | src/cert/cvc/cvc_gen_cert.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/cert/cvc/cvc_gen_cert.h b/src/cert/cvc/cvc_gen_cert.h index 059a82562..d64812e1e 100644 --- a/src/cert/cvc/cvc_gen_cert.h +++ b/src/cert/cvc/cvc_gen_cert.h @@ -16,7 +16,6 @@ #include <botan/ecdsa.h> #include <botan/ecdsa_sig.h> #include <string> -#include <assert.h> namespace Botan { @@ -87,7 +86,7 @@ class BOTAN_DLL EAC1_1_gen_CVC : public EAC1_1_obj<Derived> // CRTP continuation ASN1_Chr m_chr; bool self_signed; - static void decode_info(SharedPtrConverter<DataSource> source, + static void decode_info(DataSource& source, SecureVector<byte> & res_tbs_bits, ECDSA_Signature & res_sig); @@ -108,8 +107,8 @@ template<typename Derived> MemoryVector<byte> EAC1_1_gen_CVC<Derived>::make_sign const MemoryRegion<byte>& tbs_bits, RandomNumberGenerator& rng) // static { - SecureVector<byte> concat_sig = EAC1_1_obj<Derived>::make_signature(signer, tbs_bits, rng); - assert(concat_sig.size() % 2 == 0); + SecureVector<byte> concat_sig = EAC1_1_obj<Derived>::make_signature(signer.get(), tbs_bits, rng); + return DER_Encoder() .start_cons(ASN1_Tag(33), APPLICATION) .raw_bytes(tbs_bits) @@ -156,12 +155,12 @@ template<typename Derived> void EAC1_1_gen_CVC<Derived>::encode(Pipe& out, X509_ template<typename Derived> void EAC1_1_gen_CVC<Derived>::decode_info( - SharedPtrConverter<DataSource> source, + DataSource& source, SecureVector<byte> & res_tbs_bits, ECDSA_Signature & res_sig) { SecureVector<byte> concat_sig; - BER_Decoder(*source.get_shared().get()) + BER_Decoder(source) .start_cons(ASN1_Tag(33)) .start_cons(ASN1_Tag(78)) .raw_bytes(res_tbs_bits) |