org.glite.voms.ac

Class AttributeCertificate

Implemented Interfaces:
DEREncodable

public class AttributeCertificate
extends java.lang.Object
implements DEREncodable

A shadow implementation of the non-working BouncyCastle implementation of X.509 Attribute Certificates

Field Summary

protected static Logger
logger

Constructor Summary

AttributeCertificate(ASN1Sequence seq)

Method Summary

AttributeCertificateInfo
getAcinfo()
ASN1Sequence
getAttributes()
List
getAttributes(String oid)
Returns a list of the attributes matching the provided OID.
ACCerts
getCertList()
DERObject
getDERObject()
Produce an object suitable for an ASN1OutputStream.
X509Extensions
getExtensions()
FullAttributes
getFullAttributes()
List
getFullyQualifiedAttributes()
Holder
getHolder()
String
getHolderX509()
String
getHost()
String
getHostPort()
static AttributeCertificate
getInstance(InputStream in)
Create an Attribute Certificate from a input stream containing DER-encoded data
X500Principal
getIssuer()
X509Principal
getIssuerX509()
List
getListOfFQAN()
Date
getNotAfter()
Date
getNotBefore()
int
getPort()
DERInteger
getSerialNumber()
byte[]
getSignature()
AlgorithmIdentifier
getSignatureAlgorithm()
DERBitString
getSignatureValue()
ACTargets
getTargets()
String
getVO()
boolean
isValid()
Synonym for validAt(null)
boolean
validAt(Date date)
Checks if the AC was valid at the provided timestamp.
boolean
verify(PublicKey key)
Verifies the signature of the AC using the provided signature key
boolean
verifyCert(X509Certificate cert)

Field Details

logger

protected static final Logger logger

Constructor Details

AttributeCertificate

public AttributeCertificate(ASN1Sequence seq)
            throws IOException

Method Details

getAcinfo

public AttributeCertificateInfo getAcinfo()

getAttributes

public ASN1Sequence getAttributes()

getAttributes

public List getAttributes(String oid)
Returns a list of the attributes matching the provided OID.
Parameters:
oid - Object Identifier, on the form "1.2.3.4"
Returns:
List of ASN.1 objects representing the OID type in question

getCertList

public ACCerts getCertList()

getDERObject

public DERObject getDERObject()
Produce an object suitable for an ASN1OutputStream.
  AttributeCertificate ::= SEQUENCE {
       acinfo               AttributeCertificateInfo,
       signatureAlgorithm   AlgorithmIdentifier,
       signatureValue       BIT STRING
  }
 

getExtensions

public X509Extensions getExtensions()

getFullAttributes

public FullAttributes getFullAttributes()

getFullyQualifiedAttributes

public List getFullyQualifiedAttributes()
Returns:
List of String of the VOMS fully qualified attributes names (FQANs):
vo[/group[/group2...]][/Role=[role]][/Capability=capability]

getHolder

public Holder getHolder()

getHolderX509

public String getHolderX509()

getHost

public String getHost()

getHostPort

public String getHostPort()

getInstance

public static AttributeCertificate getInstance(InputStream in)
            throws IOException
Create an Attribute Certificate from a input stream containing DER-encoded data
Parameters:
in -
Returns:
the Attribute Certificate

getIssuer

public X500Principal getIssuer()

getIssuerX509

public X509Principal getIssuerX509()

getListOfFQAN

public List getListOfFQAN()
Returns:
List of FQAN of the VOMS fully qualified attributes names (FQANs)

getNotAfter

public Date getNotAfter()
            throws ParseException

getNotBefore

public Date getNotBefore()
            throws ParseException

getPort

public int getPort()

getSerialNumber

public DERInteger getSerialNumber()

getSignature

public byte[] getSignature()

getSignatureAlgorithm

public AlgorithmIdentifier getSignatureAlgorithm()

getSignatureValue

public DERBitString getSignatureValue()

getTargets

public ACTargets getTargets()

getVO

public String getVO()

isValid

public boolean isValid()
Synonym for validAt(null)
Returns:
true if currently valid

validAt

public boolean validAt(Date date)
Checks if the AC was valid at the provided timestamp.
Parameters:
date - if null, current time is used
Returns:
true if the AC was valid at the time in question.

verify

public boolean verify(PublicKey key)
Verifies the signature of the AC using the provided signature key
Parameters:
key - The (RSA) public key to verify the signature with
Returns:
true if success, false otherwise

verifyCert

public boolean verifyCert(X509Certificate cert)