org.edg.security.voms
Class VOMSExtension

java.lang.Object
  |
  +--org.edg.security.voms.VOMSExtension

public class VOMSExtension
extends java.lang.Object

Parses the information from a VOMS extension in a certificate.

One VOMSExtension may contain several VOMSInfo instances.

Author:
mulmo
See Also:
VOMSInfo

Field Summary
static java.lang.String VOMS_OID
          The VOMS extension OID
 
Constructor Summary
VOMSExtension(byte[] extensionValue)
           
VOMSExtension(java.security.cert.X509Certificate cert)
           
 
Method Summary
static VOMSExtension fromCert(java.security.cert.X509Certificate cert)
          Returns a VOMS extension object from the data contained in the certificate, or null if no such extension was present.
 VOMSInfo getDefaultVOMSInfo()
           
 java.util.List getVOMSInfos()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VOMS_OID

public static final java.lang.String VOMS_OID
The VOMS extension OID

See Also:
Constant Field Values
Constructor Detail

VOMSExtension

public VOMSExtension(java.security.cert.X509Certificate cert)
              throws java.lang.Exception
Parameters:
cert - the Certificate to parse out the extension from
Throws:
java.lang.Exception - in case of error
See Also:
VOMSExtension(byte[])

VOMSExtension

public VOMSExtension(byte[] extensionValue)
              throws java.lang.Exception
Parameters:
extensionValue - the content of the VOMS extension, extracted from a proxy certificate
Throws:
java.lang.Exception - in case of error
Method Detail

fromCert

public static VOMSExtension fromCert(java.security.cert.X509Certificate cert)
Returns a VOMS extension object from the data contained in the certificate, or null if no such extension was present.

Parameters:
cert - the Certificate to parse out the extension from
Returns:
VOMSExtension if the cert contained such an extension, or null
See Also:
VOMSExtension(X509Certificate)

getVOMSInfos

public java.util.List getVOMSInfos()
Returns:
List of VOMSInfo contained in this extension
See Also:
VOMSInfo

getDefaultVOMSInfo

public VOMSInfo getDefaultVOMSInfo()
Returns:
VOMSInfo the default (first) VOMS information token in this extension
See Also:
VOMSInfo

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object