diff options
author | lloyd <[email protected]> | 2012-05-27 13:32:05 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-05-27 13:32:05 +0000 |
commit | d881dedf81b97caa05740773587f865b1546dc67 (patch) | |
tree | 47d6f671a38bebabcfb149f78e23b54f67b87da9 /src/cert | |
parent | 4738d02a99eb371b5a22fd5547a4b63dfa77fb95 (diff) |
Have BER_Deocder::decode_list actually start the SEQUENCE. All callers
did it and it would be silly for it not to. Update the two existing
callers, who were both doing start_cons().decode_list().end_cons() to
just call decode_list().
Add BER_Decoder::get_next so we can get arbitrarily weird types
without having to break message chains.
Add dummy tag arguments to the ASN1_Object decoder so it can be used
from decode_optional.
Diffstat (limited to 'src/cert')
-rw-r--r-- | src/cert/x509/x509_ext.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/cert/x509/x509_ext.cpp b/src/cert/x509/x509_ext.cpp index 751d20266..7daa58f20 100644 --- a/src/cert/x509/x509_ext.cpp +++ b/src/cert/x509/x509_ext.cpp @@ -418,10 +418,7 @@ std::vector<byte> Extended_Key_Usage::encode_inner() const */ void Extended_Key_Usage::decode_inner(const std::vector<byte>& in) { - BER_Decoder(in) - .start_cons(SEQUENCE) - .decode_list(oids) - .end_cons(); + BER_Decoder(in).decode_list(oids); } /* @@ -488,10 +485,7 @@ void Certificate_Policies::decode_inner(const std::vector<byte>& in) { std::vector<Policy_Information> policies; - BER_Decoder(in) - .start_cons(SEQUENCE) - .decode_list(policies) - .end_cons(); + BER_Decoder(in).decode_list(policies); oids.clear(); for(size_t i = 0; i != policies.size(); ++i) |