Home > Archive > LDAP > March 2006 > Convert::ASN1 dump question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Convert::ASN1 dump question
|
|
| Diffenderfer, Randy 2006-03-13, 7:03 pm |
| 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
| |
| Chris Ridd 2006-03-13, 7:03 pm |
| On 13/3/06 5:36, Diffenderfer, Randy <randy.diffenderfer@eds.com> wrote:
> There are a couple differences, some cosmetic, some not so... The
> inclusion of the 'tag' primitive in the BER output I like, for instance.
Agreed.
> I'm not sure which is more apprpriated for the context tags.
I guess dumping the outer-most one makes at least some sense, because it
would correspond with the byte offset column.
> 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.
Yes, though I'm not sure if Graham's updating the BER module much. I thought
nowadays the ASN module's where it is at :-)
Cheers,
Chris
| |
| Graham Barr 2006-03-13, 7:03 pm |
| On Mon, March 13, 2006 12:08 pm, Chris Ridd wrote:
>
>
> Yes, though I'm not sure if Graham's updating the BER module much. I
> thought
> nowadays the ASN module's where it is at :-)
Thats right. Convert::BER was replaced by Convert::ASN1
Graham.
|
|
|
|
|