Represents the ASN.1 type RDNSequence (Relative Distinguished Name).
The following example illustrates the RDNSequence.
RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
RelativeDistinguishedName ::=
SET OF AttributeTypeAndValue
AttributeTypeAndValue ::= SEQUENCE {
attributeType OBJECT IDENTIFIER,
parameters ANY DEFINED BY attributeType }
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
JDE 3.6.0
Field Summary
static int
STRING_FORMAT_DEFAULT
Specifies that the default string format should be used, when passed as a parameter to toString().
static int
STRING_FORMAT_RFC2253
Specifies that an RFC2253-compliant string format should be used, when passed as a parameter to toString().
Specifies that the default string format should be used, when passed as a parameter to toString().
Since:
JDE 4.2.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
STRING_FORMAT_RFC2253
public static final int STRING_FORMAT_RFC2253
Specifies that an RFC2253-compliant string format should be used, when passed as a parameter to toString().
Since:
JDE 4.2.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
X509DistinguishedName
public X509DistinguishedName(byte[] encoding,
int offset,
int length)
throws ASN1EncodingException
Creates and initializes a distinguished name (X509DistinguishedName) object.
Parameters:
encoding - The DER encoding of this object.
offset - The offset, or start position, of the data within the array.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Creates and initializes a distinguished name
(X509DistinguishedName) object.
Note that the input is expected to be represented as a comma-delimited list, such
as CN=Joe Johnson, O=Company X, C=US. No ending character is needed, ie. the list
is assumed to be finished with the last character present in the input string. The recognized data
labels are "CN", "SN", "C", "L", "ST", "O", "OU", and "E". Any other labels will be ignored
and not included in the object. This means they won't be a factor in any .equals or comparison
operations. Also note that the ASN1 encoding of this DN
has the tag and value pairs in the order that they appear in input.
Parameters:
input - An String storing the encoding of the
Distinguished Name, eg "C=Mike, OU=Software, O=RIM". Currently supported strings are:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Creates and initializes a distinguished name
(X509DistinguishedName) object.
Note that the input is expected to be represented as a delimited list ( delimited by the character delimiter ), such
as CN=Joe Johnson, O=Company X, C=US. No ending character is needed, ie. the list
is assumed to be finished with the last character present in the input string. The recognized data
labels are "CN", "SN", "C", "L", "ST", "O", "OU", and "E". Any other labels will be ignored
and not included in the object. This means they won't be a factor in any .equals or comparison
operations. Also note that the ASN1 encoding of this DN
has the tag and value pairs in the order that they appear in input.
Parameters:
input - An String storing the encoding of the
Distinguished Name, eg "C=Mike delimiter OU=Software code>delimiter O=RIM". Currently supported strings are:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Retrieve the common name attribute associated with this
distinguished name.
Returns:
A String representing the common name. May be null.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Retrieve the country attribute associated with this
distinguished name.
Returns:
A String representing the country name. May be null.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Retrieve the email attribute associated with this
distinguished name.
Note that this function is for
legacy only. X509 v3 defines that an email address should
be found in the SubjectAltNames certificate extension.
Returns:
A String representing the email address. May be null.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
A byte array containing the encoding. May be null.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Retrieve the locality attribute associated with this
distinguished name.
Returns:
A String representing the locality. May be null.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Returns an enumeration of all the OIDs for the names.
Returns:
Returns an enumeration of all of the identifying OIDs in this DN
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Retrieve the organization attribute associated with this
distinguished name.
Returns:
Ais String representing the organization name. May be null.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Retrieve the organization unit attribute associated with this
distinguished name.
Returns:
A String representing the name of the organizational unit. May be null.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Retrieve the state-or-province attribute associated with this
distinguished name.
Returns:
A String representing the state or province name. May be null.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Retrieve the string associated with this OID.
If there are multiple attribute values for this OID, they are all returned, separated by commas.
Parameters:
oid - The oid to look up the string with
Returns:
Returns the string associated with oid, or else null
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Retrieve the surname attribute associated with this
distinguished name.
Returns:
A String representing the surname. May be null.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Returns a hash code value for the object. This method is
supported for the benefit of hashtables such as those provided by
java.util.Hashtable.
The general contract of hashCode is:
Whenever it is invoked on the same object more than once during
an execution of a Java application, the hashCode method
must consistently return the same integer, provided no information
used in equals comparisons on the object is modified.
This integer need not remain consistent from one execution of an
application to another execution of the same application.
If two objects are equal according to the equals(Object)
method, then calling the hashCode method on each of
the two objects must produce the same integer result.
It is not required that if two objects are unequal
according to the Object.equals(java.lang.Object)
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hashtables.
As much as is reasonably practical, the hashCode method defined by
class Object does return distinct integers for distinct
objects. (This is typically implemented by converting the internal
address of the object into an integer, but this implementation
technique is not required by the
JavaTM programming language.)
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Convert this DistinguishedName's internal representation to a string format.
This method will return the string in RFC2253-compliant format. The attribute
type keywords defined in RFC2253 (CN, L, ST, O, OU, C, STREET, DC, UID) will be emitted. Any other attribute types
are emitted in dotted-decimal format. Commas and other special characters within attribute values are
escaped.
Example output would be CN=Amy Krul\, Developer,O=Research In Motion,C=US,1.2.840.113549.1.9.1=akrul@rim.com.
Returns:
Returns the String representation
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Convert this DistinguishedName's internal representation to a string format.
This method will return a string in an RFC2253-like format. All known attribute type keywords
will be emitted, including all of the keywords defined in RFC2253 (CN, L, ST, O, OU, C, STREET, DC, UID)
as well as some other keywords like email (E). Other attribute types are not emitted. This string
format would be useful for display to a user, for example.
Example output would be CN=Amy Krul;O=Research In Motion;C=US;E=akrul@rim.com.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Convert this DistinguishedName's internal representation to a string format.
This method will return the string in one of two formats:
The default string format (specified by STRING_FORMAT_DEFAULT):
All known attribute type keywords
will be emitted, including all of the keywords defined in RFC2253 (CN, L, ST, O, OU, C, STREET, DC, UID)
as well as some other keywords like email (E). Other attribute types are not emitted.
An RFC2253-compliant format (specified by STRING_FORMAT_RFC2253):
The attribute
type keywords defined in RFC2253 (CN, L, ST, O, OU, C, STREET, DC, UID) will be emitted. Any other attribute types
are emitted in dotted-decimal format. Commas and other special characters within attribute values are
escaped.
Parameters:
stringFormat - indicates which of the supported string formats to use
Returns:
the String respresentation
Since:
JDE 4.2.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved. Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. Copyright 2002-2003 Nokia Corporation All Rights Reserved. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.