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

Re: [iaik-jce]



I have tested this and it worked for me. Are you sure that the Exception is
thrown exactly at this line? The constructor you called does nothing else
than setting mode and data supplying inputstream. It never invokes the
decode method.

The exception you described would be rised if you would call the
SignedDataStream(InputStream is) constructor on the raw data supplying
stream, since this constructor expects an already DER encoded SignedData
object to be parsed.

Dieter Bratko

-----Ursprüngliche Nachricht-----
Von: Vito Ingrassia <ingrassi@cefriel.it>
An: IAIK <iaik-jce@iaik.tu-graz.ac.at>
Datum: Mittwoch, 19. Mai 1999 13:30
Betreff: [iaik-jce]


> I'm using useful iaik's pkcs7 classes but a'm having a problem with this
>code;
>
>    FileInputStream fis = new FileInputStream("RawData.txt");
> //file RawData.txt esists on the right dir
>    BufferedInputStream bis = new BufferedInputStream(fis);
>(*) SignedDataStream sds = new SignedDataStream(fis,
>SignedDataStream.IMPLICIT);
>
>the contruction operation(*) (with jdk1.2) throws:
>
>java.io.IOException: Next ASN.1 object is no SEQUENCE!
>        at iaik.asn1.DerInputStream.readSequence(Unknown Source)
>        at iaik.pkcs.pkcs7.SignedDataStream.decode(Unknown Source)
>        at iaik.pkcs.pkcs7.SignedDataStream.<init>(Unknown Source)
>        at SigningDataStream.main(Compiled Code)
>
>I have no idea about reasons, can you help me?
>Thanks,
>Vito
>--
>Mailinglist-archive at
http://jcewww.iaik.tu-graz.ac.at/mailarchive/iaik-jce/maillist.html
>
>To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the
folowing content: UNSUBSCRIBE iaik-jce
>
>
>


smime.p7s