Package org.globus.gsi.bc
Class X509NameHelper
- java.lang.Object
-
- org.globus.gsi.bc.X509NameHelper
-
public class X509NameHelper extends java.lang.ObjectA helper class to deal withX509Nameobject.
-
-
Constructor Summary
Constructors Constructor Description X509NameHelper(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, java.lang.String value)Appends 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.X509NamegetAsName()Converts toX509Nameobject.org.bouncycastle.asn1.ASN1SetgetLastNameEntry()Gets 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.java.lang.StringtoString()Returns Globus format representation of the name.static java.lang.StringtoString(org.bouncycastle.asn1.x509.X509Name name)Returns Globus format representation of the name.
-
-
-
Constructor Detail
-
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 Detail
-
getAsName
public org.bouncycastle.asn1.x509.X509Name getAsName()
Converts toX509Nameobject.- Returns:
- the
X509Nameobject.
-
add
public void add(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, java.lang.String value)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
public static java.lang.String toString(org.bouncycastle.asn1.x509.X509Name name)
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
public java.lang.String toString()
Returns Globus format representation of the name.- Overrides:
toStringin classjava.lang.Object
-
-