You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Stepan Mishura (JIRA)" <ji...@apache.org> on 2006/04/05 07:53:46 UTC

[jira] Assigned: (HARMONY-304) java.security.sert.certFactory.generateCRLs(InputStream) throws CRLException on correct data

     [ http://issues.apache.org/jira/browse/HARMONY-304?page=all ]

Stepan Mishura reassigned HARMONY-304:
--------------------------------------

    Assign To: Stepan Mishura

> java.security.sert.certFactory.generateCRLs(InputStream) throws CRLException on correct data
> --------------------------------------------------------------------------------------------
>
>          Key: HARMONY-304
>          URL: http://issues.apache.org/jira/browse/HARMONY-304
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Svetlana Samoilenko
>     Assignee: Stepan Mishura
>  Attachments: crl.pem
>
> java.security.sert.certFactory.generateCRLs(InputStream) throws CRLException on correct data while RI does not throw any exceptions.
> Attached crl.pem file was created using openssl tool (http://www.openssl.org).
> Code for reproduce:
> java.io.FileInputStream;
> import java.security.cert.CertificateFactory;
> import java.util.ArrayList;
> import java.util.List;
> public class test  {
>    public static void main(String[] args) {
>         try {
>             String m_CRLFile = "crl.pem";
>             CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
>             System.out.println("Create certFactory");
>             FileInputStream fis = new FileInputStream(m_CRLFile);
>             System.out.println("Open inputstream");
>             List crlList = (ArrayList)certFactory.generateCRLs(fis);
>             System.out.println("list size="+crlList.size());
>        } catch (Exception e) {
>            System.out.println("ERROR!!!"); 
>            e.printStackTrace();   
>        }  
>     }
> }
> Put attached  crl.pem file in the same directory and run as follow:
> ..\deploy\jre\bin\java test 
>  Output on Harmony:
> create certFactory
> open inputstream
> ERROR!!!
> java.security.cert.CRLException: org.apache.harmony.security.asn1.ASN1Exception:
> ASN.1 Sequence is expected at [0]. Expected tag: 30, but encountered tag 2d
>         at org.apache.harmony.security.provider.cert.X509CRLImpl.<init>()
>         at org.apache.harmony.security.provider.cert.X509CertFactoryImpl.engineGenerateCRL()
>         at org.apache.harmony.security.provider.cert.X509CertFactoryImpl.engineGenerateCRLs()
>         at java.security.cert.CertificateFactory.generateCRLs()
>         at test.main(test.java:15)
> Caused by: org.apache.harmony.security.asn1.ASN1Exception: ASN.1 Sequence is expected at [0]. Expected tag: 30, but encountered tag 2d
>         at org.apache.harmony.security.asn1.ASN1Sequence.verify()
>         at org.apache.harmony.security.asn1.ASN1Type.decode()
>         at org.apache.harmony.security.asn1.ASN1Type.decode()
>         at org.apache.harmony.security.provider.cert.X509CRLImpl.<init>()
>        ... 4 more

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira