Package com.netscape.certsrv.kra
Class ProofOfArchival
- java.lang.Object
-
- 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$, $Date$
- Author:
- thomask
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description 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
Constantsprotected java.util.Date
mDateOfArchival
protected java.lang.String
mIssuer
protected static java.util.Vector<java.lang.String>
mNames
protected java.math.BigInteger
mSerialNo
protected java.lang.String
mSubject
protected java.math.BigInteger
mVersion
-
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.
-
-
-
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<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 proofsubject
- subject nameissuer
- issuer namedateOfArchival
- 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 interfaceIAttrSet
- Parameters:
name
- attribute nameobj
- 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 interfaceIAttrSet
- 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 interfaceIAttrSet
- 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 interfaceIAttrSet
- Returns:
- a list of names
-
getSerializableAttrNames
public java.util.Enumeration<java.lang.String> getSerializableAttrNames()
Retrieves serializable attribute names.- Specified by:
getSerializableAttrNames
in interfaceIDBObj
- Returns:
- a list of serializable attribute names
-
getVersion
public java.math.BigInteger getVersion()
Retrieves version of this proof.- Specified by:
getVersion
in interfaceIProofOfArchival
- Returns:
- version
-
getSerialNumber
public java.math.BigInteger getSerialNumber()
Retrieves the serial number.- Specified by:
getSerialNumber
in interfaceIProofOfArchival
- Returns:
- serial number
-
getSubjectName
public java.lang.String getSubjectName()
Retrieves the subject name.- Specified by:
getSubjectName
in interfaceIProofOfArchival
- Returns:
- subject name
-
getIssuerName
public java.lang.String getIssuerName()
Retrieves the issuer name.- Specified by:
getIssuerName
in interfaceIProofOfArchival
- Returns:
- issuer name
-
getDateOfArchival
public java.util.Date getDateOfArchival()
Returns the beginning of the escrowed perioid.- Specified by:
getDateOfArchival
in interfaceIProofOfArchival
- Returns:
- date of archival
-
encode
public void encode(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, 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 classjava.lang.Object
-
-