aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-03-10 17:24:03 +0000
committerlloyd <[email protected]>2007-03-10 17:24:03 +0000
commit14e794f7469f5ff06d7c35bb62ce047c65a4dcbf (patch)
treef908a3577d576b98d03e1a01feac70defd7c17c5 /doc/examples
parent3dce98940d95ab72e9fab7be9f6a11c9fe86d265 (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.cpp7
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)
{