You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Artem Aliev (JIRA)" <ji...@apache.org> on 2006/12/04 12:50:21 UTC

[jira] Created: (HARMONY-2409) [compatability] java.security.cert.X509CertSelector.addPathToName() throws IOException while RI does not

[compatability] java.security.cert.X509CertSelector.addPathToName() throws IOException while RI does not
--------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2409
                 URL: http://issues.apache.org/jira/browse/HARMONY-2409
             Project: Harmony
          Issue Type: Bug
            Reporter: Artem Aliev
            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.
-
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-2409) [classlib][security] java.security.cert.X509CertSelector.addPathToName() throws IOException while RI does not

Posted by "Ruth Cao (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (HARMONY-2409) [classlib][security] java.security.cert.X509CertSelector.addPathToName() throws IOException while RI does not

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2409?page=all ]

Stepan Mishura updated HARMONY-2409:
------------------------------------

    Component/s: Classlib

> [classlib][security] java.security.cert.X509CertSelector.addPathToName() throws IOException while RI does not
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2409
>                 URL: http://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.
-
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-2409) [compatability] java.security.cert.X509CertSelector.addPathToName() throws IOException while RI does not

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2409?page=all ]

Stepan Mishura reassigned HARMONY-2409:
---------------------------------------

    Assignee: Stepan Mishura

> [compatability] java.security.cert.X509CertSelector.addPathToName() throws IOException while RI does not
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2409
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2409
>             Project: Harmony
>          Issue Type: Bug
>            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.
-
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-2409) [classlib][security] java.security.cert.X509CertSelector.addPathToName() throws IOException while RI does not

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2409?page=all ]

Stepan Mishura updated HARMONY-2409:
------------------------------------

    Summary: [classlib][security] java.security.cert.X509CertSelector.addPathToName() throws IOException while RI does not  (was: [compatability] java.security.cert.X509CertSelector.addPathToName() throws IOException while RI does not)

> [classlib][security] java.security.cert.X509CertSelector.addPathToName() throws IOException while RI does not
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2409
>                 URL: http://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.
-
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