Top Description Fields Constructors Methods
sun.security.x509

public Class X500Name

extends Object
implements GeneralNameInterface, Principal
Class Inheritance
All Implemented Interfaces
java.security.Principal, sun.security.x509.GeneralNameInterface, sun.security.util.DerEncoder
Imports
java.io.IOException, java.security.Principal, java.util.*, javax.security.auth.x500.X500Principal, jdk.internal.access.SharedSecrets, sun.security.util.*

Note

As of 1.4, the public class, javax.security.auth.x500.X500Principal, should be used when parsing, generating, and comparing X.500 DNs. This class contains other useful methods for checking name constraints and retrieving DNs by keyword.

X.500 names are used to identify entities, such as those which are identified by X.509 certificates. They are world-wide, hierarchical, and descriptive. Entities can be identified by attributes, and in some systems can be searched for according to those attributes.

The ASN.1 for this is:

GeneralName ::= CHOICE {
....
    directoryName                   [4]     Name,
....
Name ::= CHOICE {
  RDNSequence }

RDNSequence ::= SEQUENCE OF RelativeDistinguishedName

RelativeDistinguishedName ::=
  SET OF AttributeTypeAndValue

AttributeTypeAndValue ::= SEQUENCE {
  type     AttributeType,
  value    AttributeValue }

AttributeType ::= OBJECT IDENTIFIER

AttributeValue ::= ANY DEFINED BY AttributeType
....
DirectoryString ::= CHOICE {
      teletexString           TeletexString (SIZE (1..MAX)),
      printableString         PrintableString (SIZE (1..MAX)),
      universalString         UniversalString (SIZE (1..MAX)),
      utf8String              UTF8String (SIZE (1.. MAX)),
      bmpString               BMPString (SIZE (1..MAX)) }

This specification requires only a subset of the name comparison functionality specified in the X.500 series of specifications. The requirements for conforming implementations are as follows:

  1. attribute values encoded in different types (e.g., PrintableString and BMPString) may be assumed to represent different strings;
  2. attribute values in types other than PrintableString are case sensitive (this permits matching of attribute values as binary objects);
  3. attribute values in PrintableString are not case sensitive (e.g., "Marianne Swanson" is the same as "MARIANNE SWANSON"); and
  4. attribute values in PrintableString are compared after removing leading and trailing white space and converting internal substrings of one or more consecutive white space characters to a single space.

These name comparison rules permit a certificate user to validate certificates issued using languages or encodings unfamiliar to the certificate user.

In addition, implementations of this specification MAY use these comparison rules to process unfamiliar attribute types for name chaining. This allows implementations to process certificates with unfamiliar attributes in the issuer name.

Note that the comparison rules defined in the X.500 series of specifications indicate that the character sets used to encode data in distinguished names are irrelevant. The characters themselves are compared without regard to encoding. Implementations of the profile are permitted to use the comparison algorithm defined in the X.500 series. Such an implementation will recognize a superset of name matches recognized by the algorithm specified above.

Note that instances of this class are immutable.

Authors
David Brownell, Amit Kapoor, Hemma Prafullchandra
See Also
GeneralName, GeneralNames, GeneralNameInterface

Field Summary

Modifier and TypeField and Description
private volatile List<AVA>
private String
public static final ObjectIdentifier
public static final ObjectIdentifier
private String
public static final ObjectIdentifier
public static final ObjectIdentifier
private byte[]
public static final ObjectIdentifier
public static final ObjectIdentifier
public static final ObjectIdentifier
public static final ObjectIdentifier
public static final ObjectIdentifier
private RDN[]
public static final ObjectIdentifier
public static final ObjectIdentifier
private volatile List<RDN>
private String
private String
public static final ObjectIdentifier
public static final ObjectIdentifier
public static final ObjectIdentifier
public static final ObjectIdentifier
public static final ObjectIdentifier
public static final ObjectIdentifier
private X500Principal

Constructor Summary

AccessConstructor and Description
public
X500Name(String
the X.500 Distinguished Name
dname
)

Constructs a name from a conventionally formatted string, such as "CN=Dave, OU=JavaSoft, O=Sun Microsystems, C=US".

public
X500Name(String
the X.500 Distinguished Name
dname
,
Map<String, String>
an additional keyword/OID map
keywordMap
)

Constructs a name from a conventionally formatted string, such as "CN=Dave, OU=JavaSoft, O=Sun Microsystems, C=US".

public
X500Name(String
the X.500 Distinguished Name
dname
,
String
the specified format of the String DN
format
)

Constructs a name from a string formatted according to format.

public
X500Name(String
common name of a person, e.g. "Vivette Davis"
commonName
,
String
small organization name, e.g. "Purchasing"
organizationUnit
,
String
large organization name, e.g. "Onizuka, Inc."
organizationName
,
String
two-letter country code, e.g. "CH"
country
)

Constructs a name from fields common in enterprise application environments.

public
X500Name(String
common name of a person, e.g. "Vivette Davis"
commonName
,
String
small organization name, e.g. "Purchasing"
organizationUnit
,
String
large organization name, e.g. "Onizuka, Inc."
organizationName
,
String
locality (city) name, e.g. "Palo Alto"
localityName
,
String
state name, e.g. "California"
stateName
,
String
two-letter country code, e.g. "CH"
country
)

Constructs a name from fields common in Internet application environments.

public
X500Name(RDN[]
array of relative distinguished names
rdnArray
)

Constructs a name from an array of relative distinguished names

public
X500Name(DerValue
a DER-encoded value holding an X.500 name.
value
)

Constructs a name from an ASN.1 encoded value.

public
X500Name(DerInputStream
DER-encoded data holding an X.500 name.
in
)

Constructs a name from an ASN.1 encoded input stream.

public
X500Name(byte[]
DER-encoded byte array holding an X.500 name.
name
)

Constructs a name from an ASN.1 encoded byte array.

Method Summary

Modifier and TypeMethod and Description
public List<AVA>
allAvas()

Return an immutable List of the AVAs contained in all the RDNs of this X500Name.

public static X500Name
asX500Name(X500Principal p)

Get the X500Name contained in the given X500Principal.

public X500Principal
asX500Principal()

Get an X500Principal backed by this X500Name.

public int
avaSize()

Return the total number of AVAs contained in all the RDNs of this X500Name.

public int

Returns:

constraint type above
constrains
(GeneralNameInterface
to be checked for being constrained
inputName
)

Implements sun.security.x509.GeneralNameInterface.constrains.

Return constraint type:

  • NAME_DIFF_TYPE = -1: input name is different type from this name (i.e. does not constrain)
  • NAME_MATCH = 0: input name matches this name
  • NAME_NARROWS = 1: input name narrows this name
  • NAME_WIDENS = 2: input name widens this name
  • NAME_SAME_TYPE = 3: input name does not match or narrow this name, but is same type.
pack-priv static int
countQuotes(String string, int from, int to)

public void
emit(DerOutputStream
where to put the DER-encoded X.500 name
out
)
Deprecated Use encode() instead

Encodes the name in DER-encoded form.

public void
encode(DerOutputStream
where to put the DER-encoded X.500 name
out
)

Implements sun.security.util.DerEncoder.encode.

Encodes the name in DER-encoded form.

public boolean

Returns:

true iff the names are identical.
equals
(Object
Principal to compare with.
obj
)

Overrides java.lang.Object.equals.

Implements java.security.Principal.equals.

Compares this name with another, for equality.

private static boolean
escaped(int rdnEnd, int searchOffset, String dnString)

private DerValue
findAttribute(ObjectIdentifier attribute)

Find the first instance of this attribute in a "top down" search of all the attributes in the name.

public DerValue
findMostSpecificAttribute(ObjectIdentifier attribute)

Find the most specific ("last") attribute of the given type.

private void
private String
private String
public String

Returns:

"CN=" component of the name, if any.
getCommonName
()

Returns a "Common Name" component.

public String

Returns:

"C=" component of the name, if any.
getCountry
()

Returns a "Country" name component.

public String

Returns:

"DNQ=" component of the name, if any.
getDNQualifier
()

Returns a "DN Qualifier" name component.

public String

Returns:

"DC=" component of the name, if any.
getDomain
()

Returns a "Domain" name component.

public byte[]

Returns:

the DER encoded byte array of this name.
getEncoded
()

Gets the name in DER-encoded form.

public byte[]
getEncodedInternal()

Returned the encoding as an uncloned byte array.

public String

Returns:

"GENERATION=" component of the name, if any.
getGeneration
()

Returns a "Generation Qualifier" name component.

public String

Returns:

"GIVENNAME=" component of the name, if any.
getGivenName
()

Returns a "Given Name" name component.

public String

Returns:

"INITIALS=" component of the name, if any.
getInitials
()

Returns an "Initials" name component.

public String

Returns:

"IP=" component of the name, if any.
getIP
()

Returns an "IP address" name component.

public String

Returns:

"L=" component of the name, if any.
getLocality
()

Returns a "Locality" name component.

public String
getName()

Implements java.security.Principal.getName.

Returns the value of toString().

public String

Returns:

"O=" component of the name, if any.
getOrganization
()

Returns an "Organization" name component.

public String

Returns:

"OU=" component of the name, if any.
getOrganizationalUnit
()

Returns an "Organizational Unit" name component.

public String
getRFC1779Name()

Returns a string form of the X.500 distinguished name using the algorithm defined in RFC 1779.

public String
getRFC1779Name(Map<String, String> oidMap)

Returns a string form of the X.500 distinguished name using the algorithm defined in RFC 1779.

public String
public String
getRFC2253Name()

Returns a string form of the X.500 distinguished name using the algorithm defined in RFC 2253.

public String
getRFC2253Name(Map<String, String> oidMap)

Returns a string form of the X.500 distinguished name using the algorithm defined in RFC 2253.

public String

Returns:

"S=" component of the name, if any.
getState
()

Returns a "State" name component.

private String
getString(DerValue attribute)

public String

Returns:

"SURNAME=" component of the name, if any.
getSurname
()

Returns a "Surname" name component.

public int
getType()

Implements sun.security.x509.GeneralNameInterface.getType.

Return type of GeneralName.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements java.security.Principal.hashCode.

Calculates a hash code value for the object.

public boolean
isEmpty()

Return whether this X500Name is empty.

private boolean

Returns:

true iff this name is within the subtree of other.
isWithinSubtree
(X500Name other)

Compares this name with another and determines if it is within the subtree of the other.

private void
private void
parseDN(String input, Map<String, String> keywordMap)

private void
public List<RDN>
rdns()

Return an immutable List of all RDNs in this X500Name.

public int
size()

Return the number of RDNs in this X500Name.

public int

Returns:

distance of name from root
subtreeDepth
()

Implements sun.security.x509.GeneralNameInterface.subtreeDepth.

Return subtree depth of this name for purposes of determining NameConstraints minimum and maximum bounds and for calculating path lengths in name subtrees.

public String
toString()

Overrides java.lang.Object.toString.

Implements java.security.Principal.toString.

Returns a string form of the X.500 distinguished name.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

allAvaListback to summary
private volatile List<AVA> allAvaList
canonicalDnback to summary
private String canonicalDn
commonName_oidback to summary
public static final ObjectIdentifier commonName_oid
countryName_oidback to summary
public static final ObjectIdentifier countryName_oid
dnback to summary
private String dn
DNQUALIFIER_OIDback to summary
public static final ObjectIdentifier DNQUALIFIER_OID
DOMAIN_COMPONENT_OIDback to summary
public static final ObjectIdentifier DOMAIN_COMPONENT_OID
encodedback to summary
private byte[] encoded
GENERATIONQUALIFIER_OIDback to summary
public static final ObjectIdentifier GENERATIONQUALIFIER_OID
GIVENNAME_OIDback to summary
public static final ObjectIdentifier GIVENNAME_OID
INITIALS_OIDback to summary
public static final ObjectIdentifier INITIALS_OID
ipAddress_oidback to summary
public static final ObjectIdentifier ipAddress_oid
localityName_oidback to summary
public static final ObjectIdentifier localityName_oid
namesback to summary
private RDN[] names
orgName_oidback to summary
public static final ObjectIdentifier orgName_oid
orgUnitName_oidback to summary
public static final ObjectIdentifier orgUnitName_oid
rdnListback to summary
private volatile List<RDN> rdnList
rfc1779Dnback to summary
private String rfc1779Dn
rfc2253Dnback to summary
private String rfc2253Dn
SERIALNUMBER_OIDback to summary
public static final ObjectIdentifier SERIALNUMBER_OID
stateName_oidback to summary
public static final ObjectIdentifier stateName_oid
streetAddress_oidback to summary
public static final ObjectIdentifier streetAddress_oid
SURNAME_OIDback to summary
public static final ObjectIdentifier SURNAME_OID
title_oidback to summary
public static final ObjectIdentifier title_oid
userid_oidback to summary
public static final ObjectIdentifier userid_oid
x500Principalback to summary
private X500Principal x500Principal

Constructor Detail

X500Nameback to summary
public X500Name(String dname) throws IOException

Constructs a name from a conventionally formatted string, such as "CN=Dave, OU=JavaSoft, O=Sun Microsystems, C=US". (RFC 1779, 2253, or 4514 style).

Parameters
dname:String

the X.500 Distinguished Name

X500Nameback to summary
public X500Name(String dname, Map<String, String> keywordMap) throws IOException

Constructs a name from a conventionally formatted string, such as "CN=Dave, OU=JavaSoft, O=Sun Microsystems, C=US". (RFC 1779, 2253, or 4514 style).

Parameters
dname:String

the X.500 Distinguished Name

keywordMap:Map<String, String>

an additional keyword/OID map

X500Nameback to summary
public X500Name(String dname, String format) throws IOException

Constructs a name from a string formatted according to format. Currently, the formats DEFAULT and RFC2253 are supported. DEFAULT is the default format used by the X500Name(String) constructor. RFC2253 is the format strictly according to RFC2253 without extensions.

Parameters
dname:String

the X.500 Distinguished Name

format:String

the specified format of the String DN

X500Nameback to summary
public X500Name(String commonName, String organizationUnit, String organizationName, String country) throws IOException

Constructs a name from fields common in enterprise application environments.

Note

The behaviour when any of these strings contain characters outside the ASCII range is unspecified in currently relevant standards.

Parameters
commonName:String

common name of a person, e.g. "Vivette Davis"

organizationUnit:String

small organization name, e.g. "Purchasing"

organizationName:String

large organization name, e.g. "Onizuka, Inc."

country:String

two-letter country code, e.g. "CH"

X500Nameback to summary
public X500Name(String commonName, String organizationUnit, String organizationName, String localityName, String stateName, String country) throws IOException

Constructs a name from fields common in Internet application environments.

Note

The behaviour when any of these strings contain characters outside the ASCII range is unspecified in currently relevant standards.

Parameters
commonName:String

common name of a person, e.g. "Vivette Davis"

organizationUnit:String

small organization name, e.g. "Purchasing"

organizationName:String

large organization name, e.g. "Onizuka, Inc."

localityName:String

locality (city) name, e.g. "Palo Alto"

stateName:String

state name, e.g. "California"

country:String

two-letter country code, e.g. "CH"

X500Nameback to summary
public X500Name(RDN[] rdnArray) throws IOException

Constructs a name from an array of relative distinguished names

Parameters
rdnArray:RDN[]

array of relative distinguished names

Exceptions
IOException:
on error
X500Nameback to summary
public X500Name(DerValue value) throws IOException

Constructs a name from an ASN.1 encoded value. The encoding of the name in the stream uses DER (a BER/1 subset).

Parameters
value:DerValue

a DER-encoded value holding an X.500 name.

X500Nameback to summary
public X500Name(DerInputStream in) throws IOException

Constructs a name from an ASN.1 encoded input stream. The encoding of the name in the stream uses DER (a BER/1 subset).

Parameters
in:DerInputStream

DER-encoded data holding an X.500 name.

X500Nameback to summary
public X500Name(byte[] name) throws IOException

Constructs a name from an ASN.1 encoded byte array.

Parameters
name:byte[]

DER-encoded byte array holding an X.500 name.

Method Detail

allAvasback to summary
public List<AVA> allAvas()

Return an immutable List of the AVAs contained in all the RDNs of this X500Name.

asX500Nameback to summary
public static X500Name asX500Name(X500Principal p)

Get the X500Name contained in the given X500Principal.

asX500Principalback to summary
public X500Principal asX500Principal()

Get an X500Principal backed by this X500Name.

avaSizeback to summary
public int avaSize()

Return the total number of AVAs contained in all the RDNs of this X500Name.

constrainsback to summary
public int constrains(GeneralNameInterface inputName) throws UnsupportedOperationException

Implements sun.security.x509.GeneralNameInterface.constrains.

Return constraint type:

  • NAME_DIFF_TYPE = -1: input name is different type from this name (i.e. does not constrain)
  • NAME_MATCH = 0: input name matches this name
  • NAME_NARROWS = 1: input name narrows this name
  • NAME_WIDENS = 2: input name widens this name
  • NAME_SAME_TYPE = 3: input name does not match or narrow this name, but is same type.
These results are used in checking NameConstraints during certification path verification.
Parameters
inputName:GeneralNameInterface

to be checked for being constrained

Returns:int

constraint type above

Exceptions
UnsupportedOperationException:
if name is not exact match, but narrowing and widening are not supported for this name type.
countQuotesback to summary
pack-priv static int countQuotes(String string, int from, int to)
emitback to summary
public void emit(DerOutputStream out) throws IOException

Deprecated

Use encode() instead

Encodes the name in DER-encoded form.

Parameters
out:DerOutputStream

where to put the DER-encoded X.500 name

Annotations
@Deprecated
encodeback to summary
public void encode(DerOutputStream out)

Implements sun.security.util.DerEncoder.encode.

Encodes the name in DER-encoded form.

Parameters
out:DerOutputStream

where to put the DER-encoded X.500 name

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Implements java.security.Principal.equals.

Compares this name with another, for equality.

Parameters
obj:Object

Doc from java.security.Principal.equals.

Principal to compare with.

Returns:boolean

true iff the names are identical.

Annotations
@Override
escapedback to summary
private static boolean escaped(int rdnEnd, int searchOffset, String dnString)
findAttributeback to summary
private DerValue findAttribute(ObjectIdentifier attribute)

Find the first instance of this attribute in a "top down" search of all the attributes in the name.

findMostSpecificAttributeback to summary
public DerValue findMostSpecificAttribute(ObjectIdentifier attribute)

Find the most specific ("last") attribute of the given type.

generateDNback to summary
private void generateDN()
generateRFC1779DNback to summary
private String generateRFC1779DN(Map<String, String> oidMap)
generateRFC2253DNback to summary
private String generateRFC2253DN(Map<String, String> oidMap)
getCommonNameback to summary
public String getCommonName() throws IOException

Returns a "Common Name" component. If more than one such attribute exists, the topmost one is returned.

Returns:String

"CN=" component of the name, if any.

getCountryback to summary
public String getCountry() throws IOException

Returns a "Country" name component. If more than one such attribute exists, the topmost one is returned.

Returns:String

"C=" component of the name, if any.

getDNQualifierback to summary
public String getDNQualifier() throws IOException

Returns a "DN Qualifier" name component. If more than one such component exists, the topmost one is returned.

Returns:String

"DNQ=" component of the name, if any.

getDomainback to summary
public String getDomain() throws IOException

Returns a "Domain" name component. If more than one such component exists, the topmost one is returned.

Returns:String

"DC=" component of the name, if any.

getEncodedback to summary
public byte[] getEncoded() throws IOException

Gets the name in DER-encoded form.

Returns:byte[]

the DER encoded byte array of this name.

getEncodedInternalback to summary
public byte[] getEncodedInternal() throws IOException

Returned the encoding as an uncloned byte array. Callers must guarantee that they neither modify it not expose it to untrusted code.

getGenerationback to summary
public String getGeneration() throws IOException

Returns a "Generation Qualifier" name component. If more than one such component exists, the topmost one is returned.

Returns:String

"GENERATION=" component of the name, if any.

getGivenNameback to summary
public String getGivenName() throws IOException

Returns a "Given Name" name component. If more than one such component exists, the topmost one is returned.

Returns:String

"GIVENNAME=" component of the name, if any.

getInitialsback to summary
public String getInitials() throws IOException

Returns an "Initials" name component. If more than one such component exists, the topmost one is returned.

Returns:String

"INITIALS=" component of the name, if any.

getIPback to summary
public String getIP() throws IOException

Returns an "IP address" name component. If more than one such component exists, the topmost one is returned.

Returns:String

"IP=" component of the name, if any.

getLocalityback to summary
public String getLocality() throws IOException

Returns a "Locality" name component. If more than one such component exists, the topmost one is returned.

Returns:String

"L=" component of the name, if any.

getNameback to summary
public String getName()

Implements java.security.Principal.getName.

Returns the value of toString(). This call is needed to implement the java.security.Principal interface.

Returns:String

Doc from java.security.Principal.getName.

the name of this Principal.

getOrganizationback to summary
public String getOrganization() throws IOException

Returns an "Organization" name component. If more than one such attribute exists, the topmost one is returned.

Returns:String

"O=" component of the name, if any.

getOrganizationalUnitback to summary
public String getOrganizationalUnit() throws IOException

Returns an "Organizational Unit" name component. If more than one such attribute exists, the topmost one is returned.

Returns:String

"OU=" component of the name, if any.

getRFC1779Nameback to summary
public String getRFC1779Name()

Returns a string form of the X.500 distinguished name using the algorithm defined in RFC 1779. Only standard attribute type keywords defined in RFC 1779 are emitted.

getRFC1779Nameback to summary
public String getRFC1779Name(Map<String, String> oidMap) throws IllegalArgumentException

Returns a string form of the X.500 distinguished name using the algorithm defined in RFC 1779. Attribute type keywords defined in RFC 1779 are emitted, as well as additional keywords contained in the OID/keyword map.

getRFC2253CanonicalNameback to summary
public String getRFC2253CanonicalName()
getRFC2253Nameback to summary
public String getRFC2253Name()

Returns a string form of the X.500 distinguished name using the algorithm defined in RFC 2253. Only standard attribute type keywords defined in RFC 2253 are emitted.

getRFC2253Nameback to summary
public String getRFC2253Name(Map<String, String> oidMap)

Returns a string form of the X.500 distinguished name using the algorithm defined in RFC 2253. Attribute type keywords defined in RFC 2253 are emitted, as well as additional keywords contained in the OID/keyword map.

getStateback to summary
public String getState() throws IOException

Returns a "State" name component. If more than one such component exists, the topmost one is returned.

Returns:String

"S=" component of the name, if any.

getStringback to summary
private String getString(DerValue attribute) throws IOException
getSurnameback to summary
public String getSurname() throws IOException

Returns a "Surname" name component. If more than one such component exists, the topmost one is returned.

Returns:String

"SURNAME=" component of the name, if any.

getTypeback to summary
public int getType()

Implements sun.security.x509.GeneralNameInterface.getType.

Return type of GeneralName.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements java.security.Principal.hashCode.

Calculates a hash code value for the object. Objects which are equal will also have the same hashcode.

Returns:int

Doc from java.security.Principal.hashCode.

a hashcode for this Principal

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Return whether this X500Name is empty. An X500Name is not empty if it has at least one RDN containing at least one AVA.

isWithinSubtreeback to summary
private boolean isWithinSubtree(X500Name other)

Compares this name with another and determines if it is within the subtree of the other. Useful for checking against the name constraints extension.

Returns:boolean

true iff this name is within the subtree of other.

parseDERback to summary
private void parseDER(DerInputStream in) throws IOException
parseDNback to summary
private void parseDN(String input, Map<String, String> keywordMap) throws IOException
parseRFC2253DNback to summary
private void parseRFC2253DN(String dnString) throws IOException
rdnsback to summary
public List<RDN> rdns()

Return an immutable List of all RDNs in this X500Name.

sizeback to summary
public int size()

Return the number of RDNs in this X500Name.

subtreeDepthback to summary
public int subtreeDepth() throws UnsupportedOperationException

Implements sun.security.x509.GeneralNameInterface.subtreeDepth.

Return subtree depth of this name for purposes of determining NameConstraints minimum and maximum bounds and for calculating path lengths in name subtrees.

Returns:int

distance of name from root

Exceptions
UnsupportedOperationException:
if not supported for this name type
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements java.security.Principal.toString.

Returns a string form of the X.500 distinguished name. The format of the string is from RFC 1779. The returned string may contain non-standardised keywords for more readability (keywords from RFCs 1779, 2253, and 5280).

Returns:String

Doc from java.security.Principal.toString.

a string representation of this Principal.