diff options
author | Jack Lloyd <[email protected]> | 2018-01-18 15:21:47 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-01-18 15:21:47 -0500 |
commit | 915e840bd0f77d8c2cd526a5d26a88621708f6ca (patch) | |
tree | fa93421e12d31f92e55f50f115f3badd29960669 /src/lib/x509/x509_crl.cpp | |
parent | e7b9733171835e0a91155589318fdd08b1c68113 (diff) |
Prepare for making BER_Object members private
Now there are usable accessors that allow the library to avoid
using BER_Object members directly.
Diffstat (limited to 'src/lib/x509/x509_crl.cpp')
-rw-r--r-- | src/lib/x509/x509_crl.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/x509/x509_crl.cpp b/src/lib/x509/x509_crl.cpp index c6449baf8..da075e009 100644 --- a/src/lib/x509/x509_crl.cpp +++ b/src/lib/x509/x509_crl.cpp @@ -141,9 +141,9 @@ std::unique_ptr<CRL_Data> decode_crl_body(const std::vector<uint8_t>& body, BER_Object next = tbs_crl.get_next_object(); - if(next.type_tag == SEQUENCE && next.class_tag == CONSTRUCTED) + if(next.is_a(SEQUENCE, CONSTRUCTED)) { - BER_Decoder cert_list(next.value); + BER_Decoder cert_list(next); while(cert_list.more_items()) { @@ -154,15 +154,14 @@ std::unique_ptr<CRL_Data> decode_crl_body(const std::vector<uint8_t>& body, next = tbs_crl.get_next_object(); } - if(next.type_tag == 0 && - next.class_tag == ASN1_Tag(CONSTRUCTED | CONTEXT_SPECIFIC)) + if(next.is_a(0, ASN1_Tag(CONSTRUCTED | CONTEXT_SPECIFIC))) { - BER_Decoder crl_options(next.value); + BER_Decoder crl_options(next); crl_options.decode(data->m_extensions).verify_end(); next = tbs_crl.get_next_object(); } - if(next.type_tag != NO_OBJECT) + if(next.is_set()) throw X509_CRL::X509_CRL_Error("Unknown tag in CRL"); tbs_crl.verify_end(); |