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 2007/03/14 03:58:09 UTC

[jira] Assigned: (HARMONY-3384) [classlib][security]java.security.cert.X509Certificate.toString() throws NullPointerException

     [ https://issues.apache.org/jira/browse/HARMONY-3384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stepan Mishura reassigned HARMONY-3384:
---------------------------------------

    Assignee: Stepan Mishura

> [classlib][security]java.security.cert.X509Certificate.toString() throws NullPointerException
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3384
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3384
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Leo Li
>         Assigned To: Stepan Mishura
>         Attachments: cert.dat
>
>
> Here is a testcase:
>     public void testToString() throws Exception
>          {
>              ObjectInputStream oin = new ObjectInputStream(new FileInputStream("cert.dat"));
>              X509Certificate cert = (X509Certificate) oin.readObject();
>              cert.toString();
>             oin.close();
>         }
> And the serialization file cert .dat is in the attachment.
> It passes on RI, but fails on Harmony with NullPointerException:
> java.lang.NullPointerException
> 	at java.math.BigInteger.<init>(BigInteger.java:179)
> 	at org.apache.harmony.security.x509.AuthorityKeyIdentifier$1.getDecodedObject(AuthorityKeyIdentifier.java:122)
> 	at org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.java:54)
> 	at org.apache.harmony.security.asn1.ASN1Type.decode(ASN1Type.java:98)
> 	at org.apache.harmony.security.x509.AuthorityKeyIdentifier.decode(AuthorityKeyIdentifier.java:72)
> 	at org.apache.harmony.security.x509.Extension.decodeExtensionValue(Extension.java:297)
> 	at org.apache.harmony.security.x509.Extension.dumpValue(Extension.java:333)
> 	at org.apache.harmony.security.x509.Extensions.dumpValue(Extensions.java:40)
> 	at org.apache.harmony.security.x509.TBSCertificate.dumpValue(TBSCertificate.java:290)
> 	at org.apache.harmony.security.x509.Certificate.toString(Certificate.java:118)
> 	at org.apache.harmony.security.provider.cert.X509CertImpl.toString(X509CertImpl.java:486)
> 	at X509CertificateTest.testToString(X509CertificateTest.java:15) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.