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

[iaik-jce] PKCS7CertList


  I have sample code:
    public static void main(String args[]) throws Exception {
        PKCS7CertList cl = new PKCS7CertList(new ASN1InputStream(new FileInputStream(args[0])));
        X509Certificate[] chain = cl.getCertificateList();
        X509CRL[] chain_crl = cl.getCRLList();
        //... some useful code
  I use Sun jdk 1.1.8 with jdk11x_update.jar and IAIK JCE 2.51.
I've recieved Thawte free certificate(certificate chain?, imho) and want to see
what's in it. I got following:
java.io.IOException: Next ASN.1 object is no OBJECT IDENTIFIER!
        at iaik.asn1.DerInputStream.readObjectID(Unknown Source)
        at iaik.pkcs.pkcs7.ContentInfo.decode(Unknown Source)
        at iaik.pkcs.pkcs7.ContentInfo.<init>(Unknown Source)
        at iaik.pkcs.PKCS7CertList.<init>(Unknown Source)
        at viewPKCS7CertList.main(viewPKCS7CertList.java:10)

   Any ideas, why?
   Thanx in advance.

With the best wishes,               mailto:runtime@rb.dp.ua
JS Bank "Radabank", Ukraine,