On 13/3/06 5:57, Diffenderfer, Randy <[EMAIL PROTECTED]> wrote: > Folks, > > Shouldn't have hit send so quickly. A couple more things of interest in > comparing the dump routines of Convert::ASN1 and Convert::BER. I > realize these are for *debug only*, per the source, but ... > > In Convert::BER->dump(), I think that most of the addresses of the > contents of "complicated" dumped objects are "off", pointing at the > length octet(s). > > In both routines, however, the handling of this INTEGER is suspect: > > 0085 02 16: INTEGER = 1766191625 > 0097 : } > 0097 30 13: SEQUENCE { > 0099 06 9: OBJECT ID = 1.2.840.113549.1.1.1 > 00A4 05 0: NULL > 00A6 : } > > Where the raw octets were: > > 0080 6E 67 20 43 41 02 10 69 45 F2 09 14 55 10 D8 7F ng CA..iE...U... > 0090 2C A2 97 D0 DD 65 CF 30 0D 06 09 2A 86 48 86 F7 ,....e.0...*.H.. > > Here is the "openssl asn1parse" view of the same area (offsets in > decimal...): > > 133:d=6 hl=2 l= 16 prim: INTEGER > :6945F209145510D87F2CA297D0DD65CF > 151:d=5 hl=2 l= 13 cons: SEQUENCE > 153:d=6 hl=2 l= 9 prim: OBJECT :rsaEncryption
Convert::ASN's got a bignum mode which will allow things like stupid Verisign serial numbers to be more easily held and (I guess) printed. (I'm away from the docs to check this.) Cheers, Chris