diff options
author | lloyd <[email protected]> | 2007-03-10 17:24:03 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-03-10 17:24:03 +0000 |
commit | 14e794f7469f5ff06d7c35bb62ce047c65a4dcbf (patch) | |
tree | f908a3577d576b98d03e1a01feac70defd7c17c5 /doc/examples | |
parent | 3dce98940d95ab72e9fab7be9f6a11c9fe86d265 (diff) |
Always print the exact value of the OID found in the ASN.1 example, even
if we found a human readable name for it (in that case we print both).
Diffstat (limited to 'doc/examples')
-rw-r--r-- | doc/examples/asn1.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/examples/asn1.cpp b/doc/examples/asn1.cpp index 81d3b4b5d..84fb6b276 100644 --- a/doc/examples/asn1.cpp +++ b/doc/examples/asn1.cpp @@ -146,7 +146,12 @@ void decode(BER_Decoder& decoder, u32bit level) { OID oid; data.decode(oid); - emit(type_name(type_tag), level, length, OIDS::lookup(oid)); + + std::string out = OIDS::lookup(oid); + if(out != oid.as_string()) + out += " [" + oid.as_string() + "]"; + + emit(type_name(type_tag), level, length, out); } else if(type_tag == INTEGER) { |