org.glite.security.util
Class DNImpl

java.lang.Object
  extended byorg.glite.security.util.DNImpl
All Implemented Interfaces:
DN

public class DNImpl
extends java.lang.Object
implements DN

Author:
joni

Field Summary
static int CANON
           
 java.lang.String canonicalString
           
 int count
           
 org.bouncycastle.asn1.DERObjectIdentifier[] oids
           
 java.lang.String[] rdns
           
static int RFC2253
           
 java.lang.String rfc2253String
           
static int X500
           
 java.lang.String x500String
           
 
Constructor Summary
DNImpl(org.bouncycastle.asn1.DERObjectIdentifier[] newOids, java.lang.String[] newRdns, int newCount)
          Creates a new instance of DN
DNImpl(java.security.Principal principal)
           
DNImpl(java.lang.String name)
           
 
Method Summary
 java.lang.String constructRFC2253(boolean canon)
           
 java.lang.String constructX500()
           
 boolean equals(java.lang.Object inputDN2)
           
 java.lang.String getCanon()
          Used to get the DN in canonical (small case) format.
 java.lang.String getRFC2253()
          Used to get the DN in RFC2253 format.
 java.lang.String getX500()
          Used to get the DN in X500 format.
 int hashCode()
           
 void parse(java.lang.String inputDN)
           
 java.lang.String toString()
           
 DN withoutLastCN(boolean checkProxy)
          Used to get a DN instance of the DN without the last CN.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RFC2253

public static final int RFC2253
See Also:
Constant Field Values

X500

public static final int X500
See Also:
Constant Field Values

CANON

public static final int CANON
See Also:
Constant Field Values

rfc2253String

public java.lang.String rfc2253String

x500String

public java.lang.String x500String

canonicalString

public java.lang.String canonicalString

rdns

public java.lang.String[] rdns

oids

public org.bouncycastle.asn1.DERObjectIdentifier[] oids

count

public int count
Constructor Detail

DNImpl

public DNImpl(org.bouncycastle.asn1.DERObjectIdentifier[] newOids,
              java.lang.String[] newRdns,
              int newCount)
Creates a new instance of DN


DNImpl

public DNImpl(java.lang.String name)

DNImpl

public DNImpl(java.security.Principal principal)
Method Detail

getX500

public java.lang.String getX500()
Description copied from interface: DN
Used to get the DN in X500 format. E.g. /C=US/O=Nerd Heaven/CN=Nerd Nerdsten

Specified by:
getX500 in interface DN
Returns:
String The DN in X500 format

getRFC2253

public java.lang.String getRFC2253()
Description copied from interface: DN
Used to get the DN in RFC2253 format. E.g. CN=Nerd Nerdsten,O=Nerd Heaven,C=US

Specified by:
getRFC2253 in interface DN
Returns:
String the DN in RFC2253 format

getCanon

public java.lang.String getCanon()
Description copied from interface: DN
Used to get the DN in canonical (small case) format. E.g. cn=nerd nerdsten,o=nerd heaven,c=us

Specified by:
getCanon in interface DN
Returns:
String the DN in canonical format

constructX500

public java.lang.String constructX500()

constructRFC2253

public java.lang.String constructRFC2253(boolean canon)

parse

public void parse(java.lang.String inputDN)

equals

public boolean equals(java.lang.Object inputDN2)

toString

public java.lang.String toString()

withoutLastCN

public DN withoutLastCN(boolean checkProxy)
Description copied from interface: DN
Used to get a DN instance of the DN without the last CN. E.g. from CN=proxy,CN=Nerd Nerdsten,O=Nerd Heaven,C=US to CN=Nerd Nerdsten,O=Nerd Heaven,C=US Useful for Grid applications to get the DN that is supposed to be in the previous certifiacte in the chain

Specified by:
withoutLastCN in interface DN
Parameters:
checkProxy - a switch to define whether to check that the removed part is proxy identifier
Returns:
DN the DN without the last proxy

hashCode

public int hashCode()