diff options
author | Jack Lloyd <[email protected]> | 2017-12-23 16:43:03 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-23 16:43:03 -0500 |
commit | b28f948df08153e19c76a4dec6b220c57da280cf (patch) | |
tree | 64178b4d7563545d54643fa5a40d2be548eae778 /src/lib | |
parent | bf28de2cd2c9abd3db940fcbedeb540eaed0686b (diff) |
Correctly handle ASN.1 data inside octet strings.
If we were able to successfully parse ASN.1 data embedded in an
OCTET STRING, we ended up not reporting the OCTET STRING tagging.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/asn1/asn1_print.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/asn1/asn1_print.cpp b/src/lib/asn1/asn1_print.cpp index 3452e91c4..c4d87f293 100644 --- a/src/lib/asn1/asn1_print.cpp +++ b/src/lib/asn1/asn1_print.cpp @@ -246,7 +246,12 @@ void ASN1_Pretty_Printer::decode(std::ostream& output, try { BER_Decoder inner(decoded_bits); - decode(output, inner, level + 1); + + std::ostringstream inner_data; + decode(inner_data, inner, level + 1); + + emit(output, asn1_tag_to_string(type_tag), level, length, ""); + output << inner_data.str(); } catch(...) { |