public class X500Name extends ASN1Object implements ASN1Choice
Name ::= CHOICE { RDNSequence } RDNSequence ::= SEQUENCE OF RelativeDistinguishedName RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue AttributeTypeAndValue ::= SEQUENCE { type OBJECT IDENTIFIER, value ANY }
Constructor and Description |
---|
X500Name(RDN[] rDNs) |
X500Name(java.lang.String dirName) |
X500Name(X500NameStyle style,
RDN[] rDNs) |
X500Name(X500NameStyle style,
java.lang.String dirName) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
test for equality - note: case is ignored.
|
ASN1ObjectIdentifier[] |
getAttributeTypes()
return an array of OIDs contained in the attribute type of each RDN in structure order.
|
static X500NameStyle |
getDefaultStyle()
Return the current default style.
|
static X500Name |
getInstance(ASN1TaggedObject obj,
boolean explicit)
Return a X500Name based on the passed in tagged object.
|
static X500Name |
getInstance(java.lang.Object obj) |
static X500Name |
getInstance(X500NameStyle style,
java.lang.Object obj) |
RDN[] |
getRDNs()
return an array of RDNs in structure order.
|
RDN[] |
getRDNs(ASN1ObjectIdentifier attributeType)
return an array of RDNs containing the attribute type given by OID in structure order.
|
int |
hashCode() |
static void |
setDefaultStyle(X500NameStyle style)
Set the default style for X500Name construction.
|
ASN1Primitive |
toASN1Primitive()
Method providing a primitive representation of this object suitable for encoding.
|
java.lang.String |
toString() |
getEncoded, getEncoded, hasEncodedTagValue
public X500Name(RDN[] rDNs)
public X500Name(X500NameStyle style, RDN[] rDNs)
public X500Name(java.lang.String dirName)
public X500Name(X500NameStyle style, java.lang.String dirName)
public static X500Name getInstance(ASN1TaggedObject obj, boolean explicit)
obj
- tag object holding name.explicit
- true if explicitly tagged false otherwise.public static X500Name getInstance(java.lang.Object obj)
public static X500Name getInstance(X500NameStyle style, java.lang.Object obj)
public RDN[] getRDNs()
public ASN1ObjectIdentifier[] getAttributeTypes()
public RDN[] getRDNs(ASN1ObjectIdentifier attributeType)
attributeType
- the type OID we are looking for.public ASN1Primitive toASN1Primitive()
ASN1Object
toASN1Primitive
in interface ASN1Encodable
toASN1Primitive
in class ASN1Object
public int hashCode()
hashCode
in class ASN1Object
public boolean equals(java.lang.Object obj)
equals
in class ASN1Object
public java.lang.String toString()
toString
in class java.lang.Object
public static void setDefaultStyle(X500NameStyle style)
style
- an X500NameStylepublic static X500NameStyle getDefaultStyle()