com.netscape.certsrv.kra
Class ProofOfArchival

java.lang.Object
  extended by com.netscape.certsrv.kra.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: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $
Author:
thomask
See Also:
Serialized Form

Field Summary
static java.lang.String ATTR_DATE_OF_ARCHIVAL
           
static java.lang.String ATTR_ISSUER
           
static java.lang.String ATTR_SERIALNO
           
static java.lang.String ATTR_SUBJECT
           
static java.lang.String ATTR_VERSION
           
static java.math.BigInteger DEFAULT_VERSION
          Constants
protected  java.util.Date mDateOfArchival
           
protected  java.lang.String mIssuer
           
protected static java.util.Vector mNames
           
protected  java.math.BigInteger mSerialNo
           
protected  java.lang.String mSubject
           
protected  java.math.BigInteger mVersion
           
 
Constructor Summary
ProofOfArchival(java.math.BigInteger serialNo, java.lang.String subject, java.lang.String issuer, java.util.Date dateOfArchival)
          Constructs a proof of escrow.
ProofOfArchival(java.io.InputStream in)
          Constructs proof of escrow from input stream.
 
Method Summary
 void decode(java.io.InputStream in)
          Decodes the input stream.
 void delete(java.lang.String name)
          Deletes an attribute.
 void encode(netscape.security.util.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, netscape.security.util.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 getElements()
          Retrieves a list of possible attribute names.
 java.lang.String getIssuerName()
          Retrieves the issuer name.
 java.util.Enumeration 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_VERSION

public static final java.lang.String ATTR_VERSION
See Also:
Constant Field Values

ATTR_SERIALNO

public static final java.lang.String ATTR_SERIALNO
See Also:
Constant Field Values

ATTR_SUBJECT

public static final java.lang.String ATTR_SUBJECT
See Also:
Constant Field Values

ATTR_ISSUER

public static final java.lang.String ATTR_ISSUER
See Also:
Constant Field Values

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 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 getElements()
Retrieves a list of possible attribute names.

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

getSerializableAttrNames

public java.util.Enumeration 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

encode

public void encode(netscape.security.util.DerOutputStream out)
            throws EBaseException
Encodes this proof of escrow into the given output stream.

Throws:
EBaseException

encodeAndSign

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

Throws:
EBaseException

decode

public void decode(java.io.InputStream in)
            throws EBaseException
Decodes the input stream.

Throws:
EBaseException

toString

public java.lang.String toString()
Retrieves the string reprensetation of this proof of archival.

Overrides:
toString in class java.lang.Object