Class X509NameHelper
java.lang.Object
org.globus.gsi.bc.X509NameHelper
A helper class to deal with
X509Name object.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionX509NameHelper(org.bouncycastle.asn1.ASN1Sequence seq) Creates an instance using the specified ASN.1 sequence.X509NameHelper(org.bouncycastle.asn1.x500.X500Name name) Creates an instance using existingX500Nameobject.X509NameHelper(org.bouncycastle.asn1.x509.X509Name name) Creates an instance using existingX509Nameobject. -
Method Summary
Modifier and TypeMethodDescriptionvoidAppends the specified OID and value pair name component to the end of the current name.voidadd(org.bouncycastle.asn1.ASN1Set entry) Appends the specified name component entry to the current name.org.bouncycastle.asn1.x509.X509NameConverts toX509Nameobject.org.bouncycastle.asn1.ASN1SetGets the last name component in the current name.static org.bouncycastle.asn1.ASN1SetgetLastNameEntry(org.bouncycastle.asn1.x500.X500Name name) Gets the last name component from theX509Namename.org.bouncycastle.asn1.ASN1SetgetNameEntryAt(int i) Gets the name component at specified position.toString()Returns Globus format representation of the name.private static StringtoString(org.bouncycastle.asn1.ASN1Sequence seq) static StringtoString(org.bouncycastle.asn1.x509.X509Name name) Returns Globus format representation of the name.
-
Field Details
-
seq
private org.bouncycastle.asn1.ASN1Sequence seq
-
-
Constructor Details
-
X509NameHelper
public X509NameHelper(org.bouncycastle.asn1.ASN1Sequence seq) Creates an instance using the specified ASN.1 sequence.- Parameters:
seq- the name sequence
-
X509NameHelper
public X509NameHelper(org.bouncycastle.asn1.x500.X500Name name) Creates an instance using existingX500Nameobject. This behaves like a copy constructor.- Parameters:
name- existingX500Name
-
X509NameHelper
public X509NameHelper(org.bouncycastle.asn1.x509.X509Name name) Creates an instance using existingX509Nameobject. This behaves like a copy constructor.- Parameters:
name- existingX509Name
-
-
Method Details
-
getAsName
public org.bouncycastle.asn1.x509.X509Name getAsName()Converts toX509Nameobject.- Returns:
- the
X509Nameobject.
-
add
Appends the specified OID and value pair name component to the end of the current name.- Parameters:
oid- the name component oid, e.g.BCStyle.CNvalue- the value (e.g. "proxy")
-
add
public void add(org.bouncycastle.asn1.ASN1Set entry) Appends the specified name component entry to the current name. This can be used to add handle multiple AVAs in one name component.- Parameters:
entry- the name component to add.
-
getNameEntryAt
public org.bouncycastle.asn1.ASN1Set getNameEntryAt(int i) Gets the name component at specified position.- Returns:
- the name component the specified position.
-
getLastNameEntry
public org.bouncycastle.asn1.ASN1Set getLastNameEntry()Gets the last name component in the current name.- Returns:
- the last name component. Null if there is none.
-
getLastNameEntry
public static org.bouncycastle.asn1.ASN1Set getLastNameEntry(org.bouncycastle.asn1.x500.X500Name name) Gets the last name component from theX509Namename.- Returns:
- the last name component. Null if there is none.
-
toString
Returns Globus format representation of the name. It handles names with multiple AVAs.- Parameters:
name- the name to get the Globus format of.- Returns:
- the Globus format of the name
-
toString
-
toString
-