Details
-
Bug
-
Resolution: Fixed
-
P4
-
6
-
b27
-
x86
-
linux
-
Verified
Description
Spec for X500Principal constructor says:
----------------------------------8<----------------------------------------------
public X500Principal(String name)
Creates an X500Principal from a string representation of an X.500 distinguished name (ex: "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US"). The distinguished name must be specified using the grammar defined in RFC 1779 or RFC 2253 (either format is acceptable).
This constructor recognizes the attribute type keywords defined in RFC 1779 and RFC 2253 (and listed in getName(String format)), as well as the T, DNQ or DNQUALIFIER, SURNAME, GIVENNAME, INITIALS, GENERATION, EMAILADDRESS, and SERIALNUMBER keywords whose OIDs are defined in RFC 2459 and its successor. Any other attribute type must be specified as an OID.
Parameters:
name - an X.500 distinguished name in RFC 1779 or RFC 2253 format
Throws:
NullPointerException - if the name is null
IllegalArgumentException - if the name is improperly specified
----------------------------------8<----------------------------------------------
BNF provided in RFC 1779 allows OID to contain only one number:
--------------------8<-------------------------------
<oid> ::= <digitstring> | <digitstring> "." <oid>
<digitstring> ::= 1*<digit>
<digit> ::= digits 0-9
--------------------8<-------------------------------
The same is true for RFC 2253
So following constructor:
new X500Principal("OID.1=value")
must not cause IAE to be thrown.
However IAE is thrown on JDK 6.
Note that it is not thrown in following case:
new X500Principal("OID.1.2=value")
----------------------------------8<----------------------------------------------
public X500Principal(String name)
Creates an X500Principal from a string representation of an X.500 distinguished name (ex: "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US"). The distinguished name must be specified using the grammar defined in RFC 1779 or RFC 2253 (either format is acceptable).
This constructor recognizes the attribute type keywords defined in RFC 1779 and RFC 2253 (and listed in getName(String format)), as well as the T, DNQ or DNQUALIFIER, SURNAME, GIVENNAME, INITIALS, GENERATION, EMAILADDRESS, and SERIALNUMBER keywords whose OIDs are defined in RFC 2459 and its successor. Any other attribute type must be specified as an OID.
Parameters:
name - an X.500 distinguished name in RFC 1779 or RFC 2253 format
Throws:
NullPointerException - if the name is null
IllegalArgumentException - if the name is improperly specified
----------------------------------8<----------------------------------------------
BNF provided in RFC 1779 allows OID to contain only one number:
--------------------8<-------------------------------
<oid> ::= <digitstring> | <digitstring> "." <oid>
<digitstring> ::= 1*<digit>
<digit> ::= digits 0-9
--------------------8<-------------------------------
The same is true for RFC 2253
So following constructor:
new X500Principal("OID.1=value")
must not cause IAE to be thrown.
However IAE is thrown on JDK 6.
Note that it is not thrown in following case:
new X500Principal("OID.1.2=value")