issrg.ac
Class AttributeCertificateInfo

java.lang.Object
  extended by issrg.ac.AttributeCertificateInfo
All Implemented Interfaces:
java.lang.Cloneable

public class AttributeCertificateInfo
extends java.lang.Object
implements java.lang.Cloneable

This class represents the AttributeCertificateInfo ASN.1 construct.


Field Summary
protected  AttCertValidityPeriod attrCertValidityPeriod
           
protected  java.util.Vector attributes
           
protected  Extensions extensions
           
protected  Holder holder
           
protected  AttCertIssuer issuer
           
protected  BIT_STRING issuerUniqueID
           
protected  java.math.BigInteger serialNumber
           
protected  AlgorithmID signature
           
protected  AttCertVersion version
           
 
Constructor Summary
protected AttributeCertificateInfo()
           
  AttributeCertificateInfo(ASN1Object ao)
          This constructor builds a AttributeCertificateInfo from a given ASN1Object.
  AttributeCertificateInfo(AttCertVersion version, Holder holder, AttCertIssuer issuer, AlgorithmID signature, java.math.BigInteger serialNumber, AttCertValidityPeriod attrCertValidityPeriod, java.util.Vector attributes, BIT_STRING issuerUniqueID, Extensions extensions)
          This constructor builds an AttributeCertificateInfo from its components.
 
Method Summary
 java.lang.Object clone()
           
 void decode(ASN1Object ao)
          This method decodes a given ASN1Object and sets the contents of this object to the contents of this ASN1Object.
 java.util.Vector getAttributes()
          Returns the set of Attributes of the AC.
 byte[] getEncoded()
          This method returns a DER encoding of the AttributeCertificateInfo, so you can compute the signature value for it.
 Extensions getExtensions()
          Returns the optional set of Extensions of the AC.
 Holder getHolder()
          Returns the Holder construct of the AC.
 AttCertIssuer getIssuer()
          Returns the AttCertIssuer construct of the AC.
 BIT_STRING getIssuerUniqueID()
          Returns the Issuer Unique ID optional field of the AC.
 java.math.BigInteger getSerialNumber()
          Returns the Serial Number of the AC.
 AlgorithmID getSignatureAlgorithmID()
          Returns the signature AlgorithmID construct of the AC.
 AttCertValidityPeriod getValidityPeriod()
          Returns the Attribute Certificate Validity Period construct of the AC.
 AttCertVersion getVersion()
          Returns the version of the AC.
 void setAttributes(java.util.Vector attributes)
          Sets the set of Attributes of the AC.
 void setExtensions(Extensions extensions)
          Sets the optional set of Extensions of the AC.
 void setHolder(Holder holder)
          Sets the Holder construct of the AC.
 void setIssuer(AttCertIssuer issuer)
          Sets the AttCertIssuer construct of the AC.
 void setIssuerUniqueID(BIT_STRING issuerUniqueID)
          Sets the Issuer Unique ID optional field of the AC.
 void setSerialNumber(java.math.BigInteger serialNumber)
          Sets the Serial Number of the AC.
 void setSignatureAlgorithmID(AlgorithmID signature)
          Sets the signature AlgorithmID construct of the AC.
 void setValidityPeriod(AttCertValidityPeriod validityPeriod)
          Sets the Attribute Certificate Validity Period construct of the AC.
 void setVersion(AttCertVersion version)
          Sets the version of the AC.
 ASN1Object toASN1Object()
          This method returns the ASN1Object of the AttributeCertificateInfo.
 java.lang.String toString()
           
 java.lang.String toString(java.lang.String ident)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

version

protected AttCertVersion version

holder

protected Holder holder

issuer

protected AttCertIssuer issuer

signature

protected AlgorithmID signature

serialNumber

protected java.math.BigInteger serialNumber

attrCertValidityPeriod

protected AttCertValidityPeriod attrCertValidityPeriod

attributes

protected java.util.Vector attributes

issuerUniqueID

protected BIT_STRING issuerUniqueID

extensions

protected Extensions extensions
Constructor Detail

AttributeCertificateInfo

protected AttributeCertificateInfo()

AttributeCertificateInfo

public AttributeCertificateInfo(ASN1Object ao)
                         throws CodingException
This constructor builds a AttributeCertificateInfo from a given ASN1Object.

Parameters:
ao - - the ASN1Object of the AttributeCertificateInfo
Throws:
CodingException

AttributeCertificateInfo

public AttributeCertificateInfo(AttCertVersion version,
                                Holder holder,
                                AttCertIssuer issuer,
                                AlgorithmID signature,
                                java.math.BigInteger serialNumber,
                                AttCertValidityPeriod attrCertValidityPeriod,
                                java.util.Vector attributes,
                                BIT_STRING issuerUniqueID,
                                Extensions extensions)
This constructor builds an AttributeCertificateInfo from its components.

Parameters:
version - - the AttCertVersion with the version of this AC; the version represents the version of the AC spec: some features are not present in v1 ACs (e.g. AttCertIssuer can only be GeneralNames in v1 ACs); if null, the default version will be used (V1)
holder - - the Holder of the AC
issuer - - the AttCertIssuer with the issuer of this AC
signature - - the AlgorithmID of the signature algorithm
serialNumber - - the BigInteger containing the serial number of the AC
attrCertValidityPeriod - - the AttCertValidityPeriod with the validity period of this AC
attributes - - a Vector of attributes; each element must be an Attribute; cannot be null and should contain at least one element
issuerUniqueID - - the BIT_STRING of the issuer unique identifier; can be null, if it is not present
extensions - - the Extensions of this AC; can be null, if no extensions are present in this AC
Method Detail

getVersion

public AttCertVersion getVersion()
Returns the version of the AC.


setVersion

public void setVersion(AttCertVersion version)
Sets the version of the AC.


getHolder

public Holder getHolder()
Returns the Holder construct of the AC.


setHolder

public void setHolder(Holder holder)
Sets the Holder construct of the AC.


getIssuer

public AttCertIssuer getIssuer()
Returns the AttCertIssuer construct of the AC.


setIssuer

public void setIssuer(AttCertIssuer issuer)
Sets the AttCertIssuer construct of the AC.


getSignatureAlgorithmID

public AlgorithmID getSignatureAlgorithmID()
Returns the signature AlgorithmID construct of the AC.


setSignatureAlgorithmID

public void setSignatureAlgorithmID(AlgorithmID signature)
Sets the signature AlgorithmID construct of the AC.


getSerialNumber

public java.math.BigInteger getSerialNumber()
Returns the Serial Number of the AC.


setSerialNumber

public void setSerialNumber(java.math.BigInteger serialNumber)
Sets the Serial Number of the AC.


getValidityPeriod

public AttCertValidityPeriod getValidityPeriod()
Returns the Attribute Certificate Validity Period construct of the AC.


setValidityPeriod

public void setValidityPeriod(AttCertValidityPeriod validityPeriod)
Sets the Attribute Certificate Validity Period construct of the AC.


getAttributes

public java.util.Vector getAttributes()
Returns the set of Attributes of the AC. Each element of the Vector is an Attribute.


setAttributes

public void setAttributes(java.util.Vector attributes)
Sets the set of Attributes of the AC. Each element of the Vector should be an Attribute.


getIssuerUniqueID

public BIT_STRING getIssuerUniqueID()
Returns the Issuer Unique ID optional field of the AC. Can be null, if it is missing in the AC.


setIssuerUniqueID

public void setIssuerUniqueID(BIT_STRING issuerUniqueID)
Sets the Issuer Unique ID optional field of the AC. Can be null, if it is missing in the AC.


getExtensions

public Extensions getExtensions()
Returns the optional set of Extensions of the AC. Can be null, if no extensions are present in the AC.


setExtensions

public void setExtensions(Extensions extensions)
Sets the optional set of Extensions of the AC. Can be null, if no extensions are present in the AC.


toASN1Object

public ASN1Object toASN1Object()
                        throws CodingException
This method returns the ASN1Object of the AttributeCertificateInfo.

Returns:
SEQUENCE of the elements in the same order as they appear in the constructor prototype
Throws:
CodingException

decode

public void decode(ASN1Object ao)
            throws CodingException
This method decodes a given ASN1Object and sets the contents of this object to the contents of this ASN1Object.

Parameters:
ao - - the ASN1Object with the contents of AttributeCertificateInfo; must be a SEQUENCE of elements in the same order as they appear in the constructor prototype
Throws:
CodingException

toString

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

toString

public java.lang.String toString(java.lang.String ident)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getEncoded

public byte[] getEncoded()
                  throws CodingException
This method returns a DER encoding of the AttributeCertificateInfo, so you can compute the signature value for it.

Throws:
iaik.asn1.CodingException - if an error occurs while encoding the construct
CodingException