org.italiangrid.voms.asn1
Class VOMSACUtils

java.lang.Object
  extended by org.italiangrid.voms.asn1.VOMSACUtils
All Implemented Interfaces:
VOMSConstants

public class VOMSACUtils
extends Object
implements VOMSConstants

A set of VOMS AC handling utilities.

Author:
Andrea Ceccanti

Field Summary
static String POLICY_AUTHORITY_SEP
           
 
Fields inherited from interface org.italiangrid.voms.asn1.VOMSConstants
VOMS_CERTS_OID, VOMS_EXTENSION_OID, VOMS_FQANS_OID, VOMS_GENERIC_ATTRS_OID, VOMS_HANDLED_EXTENSIONS
 
Method Summary
static VOMSAttribute deserializeVOMSAttributes(org.bouncycastle.asn1.x509.AttributeCertificate ac)
          Deserializes the information in a VOMS attribute certificate.
static List<VOMSAttribute> deserializeVOMSAttributes(List<org.bouncycastle.asn1.x509.AttributeCertificate> acs)
          Deserializes the information in a list of VOMS attribute certificates.
static List<org.bouncycastle.asn1.x509.AttributeCertificate> getACsFromCertificate(X509Certificate cert)
          Deserializes the VOMS Attribute certificates, if present, in a given certificate passed as argument
static List<org.bouncycastle.asn1.x509.AttributeCertificate> getACsFromVOMSExtension(byte[] vomsExtension)
          Deserializes the VOMS Attribute certificates in a given certificate extension
static byte[] getVOMSExtensionFromCertificate(X509Certificate cert)
          Returns the VOMS extension, if present, in a given certificate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POLICY_AUTHORITY_SEP

public static final String POLICY_AUTHORITY_SEP
See Also:
Constant Field Values
Method Detail

getVOMSExtensionFromCertificate

public static byte[] getVOMSExtensionFromCertificate(X509Certificate cert)
Returns the VOMS extension, if present, in a given certificate

Parameters:
cert - the X509Certificate where the extension will be searched
Returns:
the DER-encoded octet string of the extension value or null if it is not present.

getACsFromVOMSExtension

public static List<org.bouncycastle.asn1.x509.AttributeCertificate> getACsFromVOMSExtension(byte[] vomsExtension)
                                                                                     throws IOException
Deserializes the VOMS Attribute certificates in a given certificate extension

Parameters:
vomsExtension -
Returns:
the possybly empty List of AttributeCertificate extracted from a given extension
Throws:
IOException

getACsFromCertificate

public static List<org.bouncycastle.asn1.x509.AttributeCertificate> getACsFromCertificate(X509Certificate cert)
                                                                                   throws IOException
Deserializes the VOMS Attribute certificates, if present, in a given certificate passed as argument

Parameters:
cert - the X509Certificate where the ACs will be searched
Returns:
the possibly empty List of AttributeCertificate objects extracted from the VOMS extension
Throws:
IOException

deserializeVOMSAttributes

public static List<VOMSAttribute> deserializeVOMSAttributes(List<org.bouncycastle.asn1.x509.AttributeCertificate> acs)
Deserializes the information in a list of VOMS attribute certificates.

Parameters:
acs - a List of VOMS acs
Returns:
a possibly empty list of VOMSAttribute

deserializeVOMSAttributes

public static VOMSAttribute deserializeVOMSAttributes(org.bouncycastle.asn1.x509.AttributeCertificate ac)
Deserializes the information in a VOMS attribute certificate.

Parameters:
ac - a VOMS AttributeCertificate
Returns:
a VOMSAttribute object which provides more convenient access to the VOMS authorization information


Copyright © 2013. All Rights Reserved.