You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vladimir Ivanov (JIRA)" <ji...@apache.org> on 2006/07/03 10:43:29 UTC

[jira] Created: (HARMONY-727) [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)

[classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name) 
---------------------------------------------------------------------------------------------------------------------

         Key: HARMONY-727
         URL: http://issues.apache.org/jira/browse/HARMONY-727
     Project: Harmony
        Type: Bug

  Components: Classlib  
    Reporter: Vladimir Ivanov


According to 1.5 spec java.security.X509CertSelector. addSubjectAlternativeName(int type, String name) method must throw IOException - if a parsing error occurs. 

Harmony throws
1)    nothing if type =2,6  and  name == null; RI throws IOException
2)    IAE if type =4,8 ; RI throws IOException
3)    NumberFormatException if type = 7 and  name == non-null incorrect string; RI throws IOException
===================== test.java =========================
import java.security.cert.X509CertSelector;
import java.io.IOException;

public class test  {
    public static void main (String[] args) { 
        for (int type = 0; type <=8; type++) {
            try {
                new X509CertSelector().addSubjectAlternativeName(type,"0xDFRF");                                                                         
            } catch (IOException e) {
                System.out.println("[" + type + "] -> passed: " + e);
            } catch (Exception e) {
                System.out.println("[" + type + "] -> failed: " + e);
            }
        }
    } 
}
=====================================================
Output:
C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -showversion test
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))

[0] -> passed: java.io.IOException: unable to parse String names of type 0
[2] -> passed: java.io.IOException: DNSName components must begin with a letter
[3] -> passed: java.io.IOException: unable to parse String names of type 3
[4] -> passed: java.io.IOException: Incorrect AVA format
[5] -> passed: java.io.IOException: unable to parse String names of type 5
[6] -> passed: java.io.IOException: URI name must include scheme
[7] -> passed: java.io.IOException: Invalid IPAddress: 0xDFRF
[8] -> passed: java.io.IOException: Unable to create OIDName: java.lang.NumberFormatException: For input string: "0xDFRF"

C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showversion test
java version 1.5 (subset)

(c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
[0] -> passed: java.io.IOException: Unknown string representation for type [0]
[3] -> passed: java.io.IOException: Unknown string representation for type [3]
[4] -> failed: java.lang.IllegalArgumentException: Invalid distinguished name string
[5] -> passed: java.io.IOException: Unknown string representation for type [5]
[7] -> failed: java.lang.NumberFormatException: 0xDFRF
[8] -> failed: java.lang.IllegalArgumentException: Incorrect syntax

-- 
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-727) [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)

Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-727?page=all ]
     
Mikhail Loenko resolved HARMONY-727:
------------------------------------

    Resolution: Fixed

fixed in revision 420433
Vladimir please check that it fully resolves the issue

> [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)
> --------------------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-727
>          URL: http://issues.apache.org/jira/browse/HARMONY-727
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Vladimir Ivanov
>     Assignee: Mikhail Loenko
>  Attachments: X509CertSelectorTest.patch, harmony-727.patch.txt
>
> According to 1.5 spec java.security.X509CertSelector. addSubjectAlternativeName(int type, String name) method must throw IOException - if a parsing error occurs. 
> Harmony throws
> 1)    nothing if type =2,6  and  name == null; RI throws IOException
> 2)    IAE if type =4,8 ; RI throws IOException
> 3)    NumberFormatException if type = 7 and  name == non-null incorrect string; RI throws IOException
> ===================== test.java =========================
> import java.security.cert.X509CertSelector;
> import java.io.IOException;
> public class test  {
>     public static void main (String[] args) { 
>         for (int type = 0; type <=8; type++) {
>             try {
>                 new X509CertSelector().addSubjectAlternativeName(type,"0xDFRF");                                                                         
>             } catch (IOException e) {
>                 System.out.println("[" + type + "] -> passed: " + e);
>             } catch (Exception e) {
>                 System.out.println("[" + type + "] -> failed: " + e);
>             }
>         }
>     } 
> }
> =====================================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> [0] -> passed: java.io.IOException: unable to parse String names of type 0
> [2] -> passed: java.io.IOException: DNSName components must begin with a letter
> [3] -> passed: java.io.IOException: unable to parse String names of type 3
> [4] -> passed: java.io.IOException: Incorrect AVA format
> [5] -> passed: java.io.IOException: unable to parse String names of type 5
> [6] -> passed: java.io.IOException: URI name must include scheme
> [7] -> passed: java.io.IOException: Invalid IPAddress: 0xDFRF
> [8] -> passed: java.io.IOException: Unable to create OIDName: java.lang.NumberFormatException: For input string: "0xDFRF"
> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showversion test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> [0] -> passed: java.io.IOException: Unknown string representation for type [0]
> [3] -> passed: java.io.IOException: Unknown string representation for type [3]
> [4] -> failed: java.lang.IllegalArgumentException: Invalid distinguished name string
> [5] -> passed: java.io.IOException: Unknown string representation for type [5]
> [7] -> failed: java.lang.NumberFormatException: 0xDFRF
> [8] -> failed: java.lang.IllegalArgumentException: Incorrect syntax

-- 
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-727) [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)

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

Mikhail Loenko reassigned HARMONY-727:
--------------------------------------

    Assign To: Mikhail Loenko

> [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)
> --------------------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-727
>          URL: http://issues.apache.org/jira/browse/HARMONY-727
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Vladimir Ivanov
>     Assignee: Mikhail Loenko
>  Attachments: X509CertSelectorTest.patch, harmony-727.patch.txt
>
> According to 1.5 spec java.security.X509CertSelector. addSubjectAlternativeName(int type, String name) method must throw IOException - if a parsing error occurs. 
> Harmony throws
> 1)    nothing if type =2,6  and  name == null; RI throws IOException
> 2)    IAE if type =4,8 ; RI throws IOException
> 3)    NumberFormatException if type = 7 and  name == non-null incorrect string; RI throws IOException
> ===================== test.java =========================
> import java.security.cert.X509CertSelector;
> import java.io.IOException;
> public class test  {
>     public static void main (String[] args) { 
>         for (int type = 0; type <=8; type++) {
>             try {
>                 new X509CertSelector().addSubjectAlternativeName(type,"0xDFRF");                                                                         
>             } catch (IOException e) {
>                 System.out.println("[" + type + "] -> passed: " + e);
>             } catch (Exception e) {
>                 System.out.println("[" + type + "] -> failed: " + e);
>             }
>         }
>     } 
> }
> =====================================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> [0] -> passed: java.io.IOException: unable to parse String names of type 0
> [2] -> passed: java.io.IOException: DNSName components must begin with a letter
> [3] -> passed: java.io.IOException: unable to parse String names of type 3
> [4] -> passed: java.io.IOException: Incorrect AVA format
> [5] -> passed: java.io.IOException: unable to parse String names of type 5
> [6] -> passed: java.io.IOException: URI name must include scheme
> [7] -> passed: java.io.IOException: Invalid IPAddress: 0xDFRF
> [8] -> passed: java.io.IOException: Unable to create OIDName: java.lang.NumberFormatException: For input string: "0xDFRF"
> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showversion test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> [0] -> passed: java.io.IOException: Unknown string representation for type [0]
> [3] -> passed: java.io.IOException: Unknown string representation for type [3]
> [4] -> failed: java.lang.IllegalArgumentException: Invalid distinguished name string
> [5] -> passed: java.io.IOException: Unknown string representation for type [5]
> [7] -> failed: java.lang.NumberFormatException: 0xDFRF
> [8] -> failed: java.lang.IllegalArgumentException: Incorrect syntax

-- 
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-727) [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)

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

Mikhail Loenko closed HARMONY-727.
----------------------------------


verified

> [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-727
>                 URL: http://issues.apache.org/jira/browse/HARMONY-727
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Vladimir Ivanov
>         Assigned To: Mikhail Loenko
>         Attachments: harmony-727.patch.txt, X509CertSelectorTest.patch
>
>
> According to 1.5 spec java.security.X509CertSelector. addSubjectAlternativeName(int type, String name) method must throw IOException - if a parsing error occurs. 
> Harmony throws
> 1)    nothing if type =2,6  and  name == null; RI throws IOException
> 2)    IAE if type =4,8 ; RI throws IOException
> 3)    NumberFormatException if type = 7 and  name == non-null incorrect string; RI throws IOException
> ===================== test.java =========================
> import java.security.cert.X509CertSelector;
> import java.io.IOException;
> public class test  {
>     public static void main (String[] args) { 
>         for (int type = 0; type <=8; type++) {
>             try {
>                 new X509CertSelector().addSubjectAlternativeName(type,"0xDFRF");                                                                         
>             } catch (IOException e) {
>                 System.out.println("[" + type + "] -> passed: " + e);
>             } catch (Exception e) {
>                 System.out.println("[" + type + "] -> failed: " + e);
>             }
>         }
>     } 
> }
> =====================================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> [0] -> passed: java.io.IOException: unable to parse String names of type 0
> [2] -> passed: java.io.IOException: DNSName components must begin with a letter
> [3] -> passed: java.io.IOException: unable to parse String names of type 3
> [4] -> passed: java.io.IOException: Incorrect AVA format
> [5] -> passed: java.io.IOException: unable to parse String names of type 5
> [6] -> passed: java.io.IOException: URI name must include scheme
> [7] -> passed: java.io.IOException: Invalid IPAddress: 0xDFRF
> [8] -> passed: java.io.IOException: Unable to create OIDName: java.lang.NumberFormatException: For input string: "0xDFRF"
> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showversion test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> [0] -> passed: java.io.IOException: Unknown string representation for type [0]
> [3] -> passed: java.io.IOException: Unknown string representation for type [3]
> [4] -> failed: java.lang.IllegalArgumentException: Invalid distinguished name string
> [5] -> passed: java.io.IOException: Unknown string representation for type [5]
> [7] -> failed: java.lang.NumberFormatException: 0xDFRF
> [8] -> failed: java.lang.IllegalArgumentException: Incorrect syntax

-- 
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-727) [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)

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

Vladimir Ivanov updated HARMONY-727:
------------------------------------

    Attachment: X509CertSelectorTest.patch

unit test

> [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)
> --------------------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-727
>          URL: http://issues.apache.org/jira/browse/HARMONY-727
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Vladimir Ivanov
>  Attachments: X509CertSelectorTest.patch
>
> According to 1.5 spec java.security.X509CertSelector. addSubjectAlternativeName(int type, String name) method must throw IOException - if a parsing error occurs. 
> Harmony throws
> 1)    nothing if type =2,6  and  name == null; RI throws IOException
> 2)    IAE if type =4,8 ; RI throws IOException
> 3)    NumberFormatException if type = 7 and  name == non-null incorrect string; RI throws IOException
> ===================== test.java =========================
> import java.security.cert.X509CertSelector;
> import java.io.IOException;
> public class test  {
>     public static void main (String[] args) { 
>         for (int type = 0; type <=8; type++) {
>             try {
>                 new X509CertSelector().addSubjectAlternativeName(type,"0xDFRF");                                                                         
>             } catch (IOException e) {
>                 System.out.println("[" + type + "] -> passed: " + e);
>             } catch (Exception e) {
>                 System.out.println("[" + type + "] -> failed: " + e);
>             }
>         }
>     } 
> }
> =====================================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> [0] -> passed: java.io.IOException: unable to parse String names of type 0
> [2] -> passed: java.io.IOException: DNSName components must begin with a letter
> [3] -> passed: java.io.IOException: unable to parse String names of type 3
> [4] -> passed: java.io.IOException: Incorrect AVA format
> [5] -> passed: java.io.IOException: unable to parse String names of type 5
> [6] -> passed: java.io.IOException: URI name must include scheme
> [7] -> passed: java.io.IOException: Invalid IPAddress: 0xDFRF
> [8] -> passed: java.io.IOException: Unable to create OIDName: java.lang.NumberFormatException: For input string: "0xDFRF"
> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showversion test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> [0] -> passed: java.io.IOException: Unknown string representation for type [0]
> [3] -> passed: java.io.IOException: Unknown string representation for type [3]
> [4] -> failed: java.lang.IllegalArgumentException: Invalid distinguished name string
> [5] -> passed: java.io.IOException: Unknown string representation for type [5]
> [7] -> failed: java.lang.NumberFormatException: 0xDFRF
> [8] -> failed: java.lang.IllegalArgumentException: Incorrect syntax

-- 
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-727) [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)

Posted by "Vladimir Ivanov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-727?page=comments#action_12420074 ] 

Vladimir Ivanov commented on HARMONY-727:
-----------------------------------------

verified, thanks

> [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)
> --------------------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-727
>          URL: http://issues.apache.org/jira/browse/HARMONY-727
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Vladimir Ivanov
>     Assignee: Mikhail Loenko
>  Attachments: X509CertSelectorTest.patch, harmony-727.patch.txt
>
> According to 1.5 spec java.security.X509CertSelector. addSubjectAlternativeName(int type, String name) method must throw IOException - if a parsing error occurs. 
> Harmony throws
> 1)    nothing if type =2,6  and  name == null; RI throws IOException
> 2)    IAE if type =4,8 ; RI throws IOException
> 3)    NumberFormatException if type = 7 and  name == non-null incorrect string; RI throws IOException
> ===================== test.java =========================
> import java.security.cert.X509CertSelector;
> import java.io.IOException;
> public class test  {
>     public static void main (String[] args) { 
>         for (int type = 0; type <=8; type++) {
>             try {
>                 new X509CertSelector().addSubjectAlternativeName(type,"0xDFRF");                                                                         
>             } catch (IOException e) {
>                 System.out.println("[" + type + "] -> passed: " + e);
>             } catch (Exception e) {
>                 System.out.println("[" + type + "] -> failed: " + e);
>             }
>         }
>     } 
> }
> =====================================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> [0] -> passed: java.io.IOException: unable to parse String names of type 0
> [2] -> passed: java.io.IOException: DNSName components must begin with a letter
> [3] -> passed: java.io.IOException: unable to parse String names of type 3
> [4] -> passed: java.io.IOException: Incorrect AVA format
> [5] -> passed: java.io.IOException: unable to parse String names of type 5
> [6] -> passed: java.io.IOException: URI name must include scheme
> [7] -> passed: java.io.IOException: Invalid IPAddress: 0xDFRF
> [8] -> passed: java.io.IOException: Unable to create OIDName: java.lang.NumberFormatException: For input string: "0xDFRF"
> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showversion test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> [0] -> passed: java.io.IOException: Unknown string representation for type [0]
> [3] -> passed: java.io.IOException: Unknown string representation for type [3]
> [4] -> failed: java.lang.IllegalArgumentException: Invalid distinguished name string
> [5] -> passed: java.io.IOException: Unknown string representation for type [5]
> [7] -> failed: java.lang.NumberFormatException: 0xDFRF
> [8] -> failed: java.lang.IllegalArgumentException: Incorrect syntax

-- 
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-727) [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)

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

Alexander Kleymenov updated HARMONY-727:
----------------------------------------

    Attachment: harmony-727.patch.txt

Attached patch fixes the problem. It contains needed fixes and new testcases. 
Note, that Vladimir's test case should be fixed as it fails with ArrayIndexOutOfBounds exception (both on Harmony and RI). Loop iterations should be bounded not by "i <= types.length" but by "i < types.length".


> [classlib][security] unexpected exceptions for X509CertSelector. addSubjectAlternativeName(<2,4,6,7,8>, String name)
> --------------------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-727
>          URL: http://issues.apache.org/jira/browse/HARMONY-727
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Vladimir Ivanov
>  Attachments: X509CertSelectorTest.patch, harmony-727.patch.txt
>
> According to 1.5 spec java.security.X509CertSelector. addSubjectAlternativeName(int type, String name) method must throw IOException - if a parsing error occurs. 
> Harmony throws
> 1)    nothing if type =2,6  and  name == null; RI throws IOException
> 2)    IAE if type =4,8 ; RI throws IOException
> 3)    NumberFormatException if type = 7 and  name == non-null incorrect string; RI throws IOException
> ===================== test.java =========================
> import java.security.cert.X509CertSelector;
> import java.io.IOException;
> public class test  {
>     public static void main (String[] args) { 
>         for (int type = 0; type <=8; type++) {
>             try {
>                 new X509CertSelector().addSubjectAlternativeName(type,"0xDFRF");                                                                         
>             } catch (IOException e) {
>                 System.out.println("[" + type + "] -> passed: " + e);
>             } catch (Exception e) {
>                 System.out.println("[" + type + "] -> failed: " + e);
>             }
>         }
>     } 
> }
> =====================================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> [0] -> passed: java.io.IOException: unable to parse String names of type 0
> [2] -> passed: java.io.IOException: DNSName components must begin with a letter
> [3] -> passed: java.io.IOException: unable to parse String names of type 3
> [4] -> passed: java.io.IOException: Incorrect AVA format
> [5] -> passed: java.io.IOException: unable to parse String names of type 5
> [6] -> passed: java.io.IOException: URI name must include scheme
> [7] -> passed: java.io.IOException: Invalid IPAddress: 0xDFRF
> [8] -> passed: java.io.IOException: Unable to create OIDName: java.lang.NumberFormatException: For input string: "0xDFRF"
> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showversion test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> [0] -> passed: java.io.IOException: Unknown string representation for type [0]
> [3] -> passed: java.io.IOException: Unknown string representation for type [3]
> [4] -> failed: java.lang.IllegalArgumentException: Invalid distinguished name string
> [5] -> passed: java.io.IOException: Unknown string representation for type [5]
> [7] -> failed: java.lang.NumberFormatException: 0xDFRF
> [8] -> failed: java.lang.IllegalArgumentException: Incorrect syntax

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