harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svetlana Samoilenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-304) java.security.sert.certFactory.generateCRLs(InputStream) throws CRLException on correct data
Date Wed, 05 Apr 2006 05:47:44 GMT
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


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


Mime
View raw message