[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iaik-jce] IAIK ASN1 creation error (take 2)



From my point of view the encoding you attached is invalid. I have tried it
with asn1parse of OpenSSL and - as you already have said - got an output.
However there is included an INTEGER value encoded with none content octet:

asn1Parse output:

297:d=7  hl=2 l=   2 cons:        SET
 299:d=8  hl=2 l=   0 prim:         INTEGER           :00

corresponding encoding sequence in reply.der:

31:02:02:00

The INTEGER is encoded with length 00 and no content octets. From my knowing
this is not allowed (maybe that asn1Parse takes a default value of 00 in
this case, but I think, this is not correct). However, I will consult an
ASN.1 book to clarify this.

Dieter Bratko

----- Original Message -----
From: Hu Liang <gnailuh@yahoo.com>
To: <iaik-jce@iaik.tu-graz.ac.at>
Sent: Tuesday, January 25, 2000 4:04 AM
Subject: [iaik-jce] IAIK ASN1 creation error (take 2)


> Please excuse my ignorance, I forgot to attached the
> file.  The following text is the same as the previous
> posting.
>
> -----------------------------------------------------
>
> Hello,
>
> This is my first mailing list posting, please excuse
> me if this format is incorrect.
>
> I attached a der encoded ASN1 object, it is a
> CRS(Certificate Request Syntax) reply.  I tried to
> instantiate an iaik.asn1.ASN1 object with the reply
> data as a byte[], as well as calling the method
> iaik.asn1.DerCoder.decode(byte[]).  On both tries, I
> get CodingException, cascaded ASN.1 creation errors.
>
> The der file is validly DER encoded, it begins with
> the byte 0x30.  Also, I am able to use OpenSSL's
> asn1parse routine to parse this der file.  With
> OpenSSL, I parsed the der file and redirected the
> OpenSSL DER output into a file.  The two files are of
> different size.  The IAIK ASN1 class was then able to
> be instantiate with the new byte[] produced byOpenSSL.
>
>
> Can anyone help me parse this der file directly with
> IAIK?  It is a pkcs7 type.  I'm trying to find out
> more from the source about the original der file.  It
> seems to be OpenSSL compatible but not IAIK.
>
> I'd appreciate any feedback.
>
> Thanks,
> Hu
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.com



smime.p7s