org.glite.security.util
Class DNHandler

java.lang.Object
  extended by org.glite.security.util.DNHandler

public class DNHandler
extends java.lang.Object

Distinguished Name (DN) handling routines. These routines are separated into this separate class to ensure the DN is always handled the same way. This separation also makes changing the handling easy in case when for example the encoding changes or there is need for changes in internationalization support.


Constructor Summary
DNHandler()
           
 
Method Summary
static DN getDN(java.security.Principal principal)
          Generates a DN object form the Principal object.
static DN getDN(java.lang.String inputDN)
          Generates a DN object form a String.
static DN getIssuer(java.security.cert.X509Certificate cert)
          Picks up the issuer from the certificate as a DN class without any transformations etc.
static DN getSubject(java.security.cert.X509Certificate cert)
          Picks up the subject from the certificate as a DN class without any transformations etc.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DNHandler

public DNHandler()
Method Detail

getIssuer

public static DN getIssuer(java.security.cert.X509Certificate cert)
Picks up the issuer from the certificate as a DN class without any transformations etc.

Parameters:
cert - The certificate to the the issuer from.
Returns:
The DN class representation of the issuer.

getSubject

public static DN getSubject(java.security.cert.X509Certificate cert)
Picks up the subject from the certificate as a DN class without any transformations etc.

Parameters:
cert - The certificate to the the issuer from.
Returns:
The DN class representation of the subject.

getDN

public static DN getDN(java.security.Principal principal)
Generates a DN object form the Principal object.

Parameters:
principal - The Principal to get the DN from.
Returns:
The DN class representation of the DN.

getDN

public static DN getDN(java.lang.String inputDN)
Generates a DN object form a String.

Parameters:
inputDN - The string to get the DN from.
Returns:
The DN class representation of the DN.