Folks,

While fiddling with Convert::ASN1's wonderful dump routine, asn_dump(),
and Convert::BER's equally nice dump() routine, I came across the
following "huh?"...

[Convert::BER->dump() v 1.3101]

...
0060 13   35:                   UNIVERSAL [19]
...
0097 30   13:           SEQUENCE {
0099 06    9:             OBJECT ID = 1.2.840.113549.1.1.1
00A4 05    0:             NULL
00A6        :           }
00A6 04  128:           STRING
00A7        :             A4 6C D8 2E 34 67 60 F0 24 6F D4 8B C9 36 70
A2 .l..4g`.$o...6p.
...

[Convert::ASN1->asn_dump() v 0.20]

...
0060   35:                   [UNIVERSAL 19]
...
0097   13:           SEQUENCE {
0099    9:             OBJECT ID = 1.2.840.113549.1.1.1
00A4    0:             NULL
00A6     :           }
00A6  128:           STRING
00A9     :             A4 6C D8 2E 34 67 60 F0 24 6F D4 8B C9 36 70 A2
.l..4g`.$o...6p.
...

There are a couple differences, some cosmetic, some not so...  The
inclusion of the 'tag' primitive in the BER output I like, for instance.
I'm not sure which is more apprpriated for the context tags.

But the "huh" is in the address of the STRING contents.  Here I think
ASN1 has gotten it right.  The "A4" octet is at offset 00A9 in the
object, not at 00A7 (which is the length value) as depicted in BER.

I think it would be a good thing to have these guys consistent, and I do
think the BER string contents' offset isn't kosher.

Thoughts?

Thanks,
rnd

Reply via email to