harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stepan Mishura (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3384) [classlib][security]java.security.cert.X509Certificate.toString() throws NullPointerException
Date Thu, 22 Mar 2007 03:27:32 GMT

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

Stepan Mishura commented on HARMONY-3384:
-----------------------------------------

Hi Leo,

I've fixed the bug in SECURITY module at r521100.

I afraid I can not add RI's certificate to SVN so I created manually test certificate that
reproduces the failure. (The test certificate has AuthorityKeyIdentifier extension with absent
authorityCertSerialNumber field.) Please check that the fix resolved the NPE problem for RI's
certificate.

The issue with certificate verification should be investigated. Could you provide more details?
What exception do you see?

Thanks,
Stepan.

> [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.


Mime
View raw message