Class ProofOfArchival

  • All Implemented Interfaces:
    IAttrSet, IDBObj, IProofOfArchival, java.io.Serializable

    public class ProofOfArchival
    extends java.lang.Object
    implements IDBObj, IProofOfArchival, java.io.Serializable
    A class represents a proof of escrow. It indicates a key pairs have been escrowed by appropriate authority. The structure of this object is very similar (if not exact) to X.509 certificate. A proof of escrow is signed by an escrow authority. It is possible to have a CMS policy to reject the certificate issuance request if proof of escrow is not presented.

    Here is the ASN1 definition of a proof of escrow:

     ProofOfEscrow ::= SIGNED {
       SEQUENCE {
         version [0] Version DEFAULT v1,
         serialNumber INTEGER,
         subjectName Name,
         issuerName Name,
         dateOfArchival Time,
         extensions [1] Extensions OPTIONAL
       }
     }
     

    Version:
    $Revision$, $Date$
    Author:
    thomask
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ProofOfArchival​(java.io.InputStream in)
      Constructs proof of escrow from input stream.
      ProofOfArchival​(java.math.BigInteger serialNo, java.lang.String subject, java.lang.String issuer, java.util.Date dateOfArchival)
      Constructs a proof of escrow.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void decode​(java.io.InputStream in)
      Decodes the input stream.
      void delete​(java.lang.String name)
      Deletes an attribute.
      void encode​(DerOutputStream out)
      Encodes this proof of escrow into the given output stream.
      void encodeAndSign​(java.security.PrivateKey key, java.lang.String algorithm, java.lang.String provider, DerOutputStream out)
      Encodes and signs this proof of escrow.
      java.lang.Object get​(java.lang.String name)
      Retrieves the value of an named attribute.
      java.util.Date getDateOfArchival()
      Returns the beginning of the escrowed perioid.
      java.util.Enumeration<java.lang.String> getElements()
      Retrieves a list of possible attribute names.
      java.lang.String getIssuerName()
      Retrieves the issuer name.
      java.util.Enumeration<java.lang.String> getSerializableAttrNames()
      Retrieves serializable attribute names.
      java.math.BigInteger getSerialNumber()
      Retrieves the serial number.
      java.lang.String getSubjectName()
      Retrieves the subject name.
      java.math.BigInteger getVersion()
      Retrieves version of this proof.
      void set​(java.lang.String name, java.lang.Object obj)
      Sets an attribute value.
      java.lang.String toString()
      Retrieves the string reprensetation of this proof of archival.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DEFAULT_VERSION

        public static final java.math.BigInteger DEFAULT_VERSION
        Constants
      • ATTR_DATE_OF_ARCHIVAL

        public static final java.lang.String ATTR_DATE_OF_ARCHIVAL
        See Also:
        Constant Field Values
      • mSerialNo

        protected java.math.BigInteger mSerialNo
      • mVersion

        protected java.math.BigInteger mVersion
      • mSubject

        protected java.lang.String mSubject
      • mIssuer

        protected java.lang.String mIssuer
      • mDateOfArchival

        protected java.util.Date mDateOfArchival
      • mNames

        protected static java.util.Vector<java.lang.String> mNames
    • Constructor Detail

      • ProofOfArchival

        public ProofOfArchival​(java.math.BigInteger serialNo,
                               java.lang.String subject,
                               java.lang.String issuer,
                               java.util.Date dateOfArchival)
        Constructs a proof of escrow.

        Parameters:
        serialNo - serial number of proof
        subject - subject name
        issuer - issuer name
        dateOfArchival - date of archival
      • ProofOfArchival

        public ProofOfArchival​(java.io.InputStream in)
                        throws EBaseException
        Constructs proof of escrow from input stream.

        Parameters:
        in - encoding source
        Throws:
        EBaseException - failed to decode
    • Method Detail

      • set

        public void set​(java.lang.String name,
                        java.lang.Object obj)
                 throws EBaseException
        Sets an attribute value.

        Specified by:
        set in interface IAttrSet
        Parameters:
        name - attribute name
        obj - attribute value
        Throws:
        EBaseException - failed to set attribute
      • get

        public java.lang.Object get​(java.lang.String name)
                             throws EBaseException
        Retrieves the value of an named attribute.

        Specified by:
        get in interface IAttrSet
        Parameters:
        name - attribute name
        Returns:
        attribute value
        Throws:
        EBaseException - failed to get attribute
      • delete

        public void delete​(java.lang.String name)
                    throws EBaseException
        Deletes an attribute.

        Specified by:
        delete in interface IAttrSet
        Parameters:
        name - attribute name
        Throws:
        EBaseException - failed to get attribute
      • getElements

        public java.util.Enumeration<java.lang.String> getElements()
        Retrieves a list of possible attribute names.

        Specified by:
        getElements in interface IAttrSet
        Returns:
        a list of names
      • getSerializableAttrNames

        public java.util.Enumeration<java.lang.String> getSerializableAttrNames()
        Retrieves serializable attribute names.
        Specified by:
        getSerializableAttrNames in interface IDBObj
        Returns:
        a list of serializable attribute names
      • getVersion

        public java.math.BigInteger getVersion()
        Retrieves version of this proof.

        Specified by:
        getVersion in interface IProofOfArchival
        Returns:
        version
      • getSerialNumber

        public java.math.BigInteger getSerialNumber()
        Retrieves the serial number.

        Specified by:
        getSerialNumber in interface IProofOfArchival
        Returns:
        serial number
      • getSubjectName

        public java.lang.String getSubjectName()
        Retrieves the subject name.

        Specified by:
        getSubjectName in interface IProofOfArchival
        Returns:
        subject name
      • getIssuerName

        public java.lang.String getIssuerName()
        Retrieves the issuer name.

        Specified by:
        getIssuerName in interface IProofOfArchival
        Returns:
        issuer name
      • getDateOfArchival

        public java.util.Date getDateOfArchival()
        Returns the beginning of the escrowed perioid.

        Specified by:
        getDateOfArchival in interface IProofOfArchival
        Returns:
        date of archival
      • encodeAndSign

        public void encodeAndSign​(java.security.PrivateKey key,
                                  java.lang.String algorithm,
                                  java.lang.String provider,
                                  DerOutputStream out)
                           throws EBaseException
        Encodes and signs this proof of escrow.

        Throws:
        EBaseException
      • toString

        public java.lang.String toString()
        Retrieves the string reprensetation of this proof of archival.
        Overrides:
        toString in class java.lang.Object