harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruth Cao (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2409) [classlib][security] java.security.cert.X509CertSelector.addPathToName() throws IOException while RI does not
Date Tue, 23 Jan 2007 03:23:49 GMT

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

Ruth Cao commented on HARMONY-2409:
-----------------------------------

Hi,

I think this issue is a RI bug and the behavior of Harmony is reasonable. Since RFC3280 section
4.2.1.7 has mentioned:

When the subjectAltName extension contains a URI,   The name MUST include both a scheme (e.g.,
"http" or "ftp") and a scheme-specific-part. 

Back to this case, new URI("string") has a null scheme so perhaps it's reasonable to throw
IOException here.

Any comments or suggestions? 

Ruth

> [classlib][security] java.security.cert.X509CertSelector.addPathToName() throws IOException
while RI does not
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2409
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2409
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>         Assigned To: Stepan Mishura
>            Priority: Minor
>
> According to the specification method addPathToName(int type, String name)
> throws IOException if a parsing error occurs.
> RI does not throw IOException for  addPathToName(6,"string") parameters while
> Harmony throws with the message: Bad representation of
> uniformResourceIdentifier. It must include the scheme and a
> scheme-specific-part: string.
> Test for reproducing:
> import junit.framework.TestCase;
> import java.security.cert.*;
> import java.io.*;
> public class test extends TestCase {      
>     public void test1 () {         
>        try { 
>            X509CertSelector obj=new X509CertSelector();         
>            obj.addPathToName(6,"string"); 
>         } catch (IOException e) { 
>             fail("unexpected exception"+e);
>         }        
>     }
> }
> Output on Sun 1.5
> =================
> Time: 0,015
> OK (1 testt)
> Output on Harmony:
> ==================
> .F
> Time: 0.032
> There was 1 failure:
> 1) test1(test)junit.framework.AssertionFailedError: unexpected exception
> java.io.IOException: Bad representation of uniformResourceIdentifier. It must
> include the scheme and a scheme-specific-part: string
>         at test.test1(test.java:11)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0

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