From: pgut001(_at_)cs(_dot_)auckland(_dot_)ac(_dot_)nz (Peter Gutmann)
To: ietf-pkix(_at_)tandem(_dot_)com, ietf-smime(_at_)imc(_dot_)org,
ssl-talk(_at_)netscape(_dot_)com
I've just updated my ASN.1 dump/diagnostic utility to handle the BER a bit
better, which means you can now display things like PKCS #7 objects and (in
general) anything else which mixes BER and DER-encoded data. The program is
aware of most of the common crypto-related object identifiers and types, so
it'll give you a proper description of what it is you're looking at. Here's
some sample output from the start of a cert:
0 30 618: SEQUENCE {
4 30 467: SEQUENCE {
8 2 4: INTEGER 830525701
14 30 13: SEQUENCE {
16 6 9: OBJECT IDENTIFIER
: md5withRSAEncryption (1 2 840 113549 1 1 4)
27 5 0: NULL
: }
29 30 125: SEQUENCE {
31 31 11: SET {
33 30 9: SEQUENCE {
35 6 3: OBJECT IDENTIFIER countryName (2 5 4 6)
40 13 2: PrintableString 'Ca'
: }
: }
[etc]
Peter,
Thanks for publicising the program, making it available on your
website, and including an acknowledgement of the original in a
comment. I had made a few changes since the version I sent you, to
make the output a bit more readable, in addition to supporting BER
data. The following is what the new output looks like, from a posting
to ietf-pkix on April 15:
offs tag lenbytes length value
---- -- --------- --- ----------------------
0000 30 80 859: SEQUENCE
0002 30 82 02 c0 704: . SEQUENCE
0006 a0 03 3: . . [0]
0008 02 01 1: . . . INTEGER 2
0011 02 02 2: . . INTEGER 256
0015 30 0d 13: . . SEQUENCE
0017 06 09 9: . . . OID 1.2.840.113549.1.1.2: md2WithRSAEncryption
0028 05 00 0: . . . NULL
0030 30 68 104: . . SEQUENCE
0032 31 0b 11: . . . SET
0034 30 09 9: . . . . SEQUENCE
0036 06 03 3: . . . . . OID 2.5.4.6: C
0041 13 02 2: . . . . . PrintableString 'ES'
[etc]
If you agree that the expanded header bytes and the alignment dots
(instead of braces) help readability, you may wish to add them to your
version. Of course, indentation style is all a matter of taste, so
some people may prefer the earlier format :-).
Regards,
dpk