aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-11-15 16:12:01 -0500
committerJack Lloyd <[email protected]>2017-11-15 16:50:53 -0500
commit2dc3e2286c811830f5bbc1da62cda087e9a80cb3 (patch)
treebbaa56f9c1caafb04485ac1267744c01115dbc20
parenta94a462f6ddab82bae2e42ca19aa9d7e5780a5b0 (diff)
Correct handling of nested context specific
-rw-r--r--src/lib/asn1/asn1_print.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/asn1/asn1_print.cpp b/src/lib/asn1/asn1_print.cpp
index e314b5c99..ccd06a380 100644
--- a/src/lib/asn1/asn1_print.cpp
+++ b/src/lib/asn1/asn1_print.cpp
@@ -48,7 +48,7 @@ std::string ASN1_Pretty_Printer::format_binary(const std::vector<uint8_t>& in) c
}
else
{
- out << "%" << std::hex << static_cast<int>(c) << std::dec;
+ out << "x" << std::hex << static_cast<int>(c) << std::dec;
++unprintable;
if(unprintable >= in.size() / 4)
{
@@ -161,11 +161,10 @@ void ASN1_Pretty_Printer::decode(std::ostream& output,
{
if(m_print_context_specific)
{
- std::vector<uint8_t> bits;
- data.decode(bits, type_tag);
-
try
{
+ std::vector<uint8_t> bits;
+ data.decode(bits, type_tag);
BER_Decoder inner(bits);
decode(output, inner, level + 1); // recurse
}