diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pubkey/ec_dompar/ec_dompar.cpp | 8 | ||||
-rw-r--r-- | src/pubkey/ecc_key/ecc_key.h | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/pubkey/ec_dompar/ec_dompar.cpp b/src/pubkey/ec_dompar/ec_dompar.cpp index 0b5a6e681..475a1ce52 100644 --- a/src/pubkey/ec_dompar/ec_dompar.cpp +++ b/src/pubkey/ec_dompar/ec_dompar.cpp @@ -552,18 +552,16 @@ EC_Domain_Params decode_ber_ec_dompar(SecureVector<byte> const& encoded) { BER_Decoder dec(encoded); BER_Object obj = dec.get_next_object(); - ASN1_Tag tag = obj.type_tag; - std::auto_ptr<EC_Domain_Params> p_result; - if(tag == OBJECT_ID) + if(obj.type_tag == OBJECT_ID) { OID dom_par_oid; BER_Decoder(encoded).decode(dom_par_oid); return EC_Domain_Params(get_ec_dompar(dom_par_oid.as_string())); } - else if(tag == SEQUENCE) + else if(obj.type_tag == SEQUENCE) return EC_Domain_Params(decode_ber_ec_dompar_explicit(encoded)); - else if(tag == NULL_TAG) + else if(obj.type_tag == NULL_TAG) throw Decoding_Error("cannot decode ECDSA parameters that are ImplicitCA"); throw Decoding_Error("encountered unexpected when trying to decode domain parameters"); diff --git a/src/pubkey/ecc_key/ecc_key.h b/src/pubkey/ecc_key/ecc_key.h index 0ca9a0e75..c1a227bf2 100644 --- a/src/pubkey/ecc_key/ecc_key.h +++ b/src/pubkey/ecc_key/ecc_key.h @@ -16,6 +16,7 @@ #include <botan/ec_dompar.h> #include <botan/x509_key.h> #include <botan/pkcs8.h> +#include <memory> namespace Botan { |