You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Svetlana Samoilenko (JIRA)" <ji...@apache.org> on 2006/04/05 07:47:44 UTC
[jira] Created: (HARMONY-304)
java.security.sert.certFactory.generateCRLs(InputStream) throws
CRLException on correct data
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
[jira] Commented: (HARMONY-304)
java.security.sert.certFactory.generateCRLs(InputStream) throws
CRLException on correct data
Posted by "Svetlana Samoilenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-304?page=comments#action_12411902 ]
Svetlana Samoilenko commented on HARMONY-304:
---------------------------------------------
Alexander, Stepan,
Thanks a lot. The fix works fine for me.
> 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_patch.txt, CertificateFactoryTest.java, 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
[jira] Updated: (HARMONY-304)
java.security.sert.certFactory.generateCRLs(InputStream) throws
CRLException on correct data
Posted by "Alexander Kleymenov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-304?page=all ]
Alexander Kleymenov updated HARMONY-304:
----------------------------------------
Attachment: CRL_PEM_patch.txt
PEM CRL generation is not demanded by the spec for CertificateFactory, but this functionality is a good point to improve current implementation. This patch adds PEM CRLs support to the Factory and corresponding test case to its unit test.
Thanks,
Alexander.
> 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_patch.txt, CertificateFactoryTest.java, 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
[jira] Closed: (HARMONY-304)
java.security.sert.certFactory.generateCRLs(InputStream) throws
CRLException on correct data
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-304?page=all ]
Stepan Mishura closed HARMONY-304:
----------------------------------
Verified by Svetlana and Alexander.
> 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_patch.txt, CertificateFactoryTest.java, 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
[jira] Commented: (HARMONY-304)
java.security.sert.certFactory.generateCRLs(InputStream) throws
CRLException on correct data
Posted by "Alexander Kleymenov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-304?page=comments#action_12411917 ]
Alexander Kleymenov commented on HARMONY-304:
---------------------------------------------
The result looks as expected. Thank You!
> 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_patch.txt, CertificateFactoryTest.java, 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
[jira] Updated: (HARMONY-304)
java.security.sert.certFactory.generateCRLs(InputStream) throws
CRLException on correct data
Posted by "Svetlana Samoilenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-304?page=all ]
Svetlana Samoilenko updated HARMONY-304:
----------------------------------------
Attachment: CertificateFactoryTest.java
unit test
> 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: CertificateFactoryTest.java, 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
[jira] Assigned: (HARMONY-304)
java.security.sert.certFactory.generateCRLs(InputStream) throws
CRLException on correct data
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ 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
[jira] Resolved: (HARMONY-304)
java.security.sert.certFactory.generateCRLs(InputStream) throws
CRLException on correct data
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-304?page=all ]
Stepan Mishura resolved HARMONY-304:
------------------------------------
Resolution: Fixed
Thanks Svetlana and Alexander.
Alexander, updated patch was applied to SECURITY module at r406624. (I've modified new tests to follow conventions). Please verify that the patch was applied as you expected.
Svetlana, please check that the fix fully resolves your problem.
> 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_patch.txt, CertificateFactoryTest.java, 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
[jira] Updated: (HARMONY-304)
java.security.sert.certFactory.generateCRLs(InputStream) throws
CRLException on correct data
Posted by "Svetlana Samoilenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-304?page=all ]
Svetlana Samoilenko updated HARMONY-304:
----------------------------------------
Attachment: crl.pem
certificate revocation list
> 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
> 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