org.glite.security.util.proxy
Class ProxyCertUtil

java.lang.Object
  extended by org.glite.security.util.proxy.ProxyCertUtil

public class ProxyCertUtil
extends java.lang.Object

Utility methods to dig up information out of proxy certificates.

Author:
Joni Hahkala

Constructor Summary
ProxyCertUtil()
           
 
Method Summary
static void checkProxyDN(DN parent, DN proxy)
          Check whether the proxy DN is valid compared to the issuer DN, meaning that the DN or the proxy starts with the DN of the parent
static java.math.BigInteger getSN(org.bouncycastle.asn1.x509.X509Name dn)
          Returns the serial number CN part of the DN, if present.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyCertUtil

public ProxyCertUtil()
Method Detail

checkProxyDN

public static void checkProxyDN(DN parent,
                                DN proxy)
                         throws java.lang.IllegalArgumentException
Check whether the proxy DN is valid compared to the issuer DN, meaning that the DN or the proxy starts with the DN of the parent

Parameters:
parent - the DN of the parent.
proxy - the DN of the proxy.
Throws:
java.lang.IllegalArgumentException - thrown in case the DN parsing fails.

getSN

public static java.math.BigInteger getSN(org.bouncycastle.asn1.x509.X509Name dn)
Returns the serial number CN part of the DN, if present.

Parameters:
dn - The DN that ends or starts with (to accept also reversed DNs) the "CN=" RDN.
Returns:
the BigInteger serial number if found.