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.StringATTR_DATE_OF_ARCHIVALstatic java.lang.StringATTR_ISSUERstatic java.lang.StringATTR_SERIALNOstatic java.lang.StringATTR_SUBJECTstatic java.lang.StringATTR_VERSIONstatic java.math.BigIntegerDEFAULT_VERSIONConstantsprotected java.util.DatemDateOfArchivalprotected java.lang.StringmIssuerprotected static java.util.Vector<java.lang.String>mNamesprotected java.math.BigIntegermSerialNoprotected java.lang.StringmSubjectprotected java.math.BigIntegermVersion
-
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 voiddecode(java.io.InputStream in)Decodes the input stream.voiddelete(java.lang.String name)Deletes an attribute.voidencode(DerOutputStream out)Encodes this proof of escrow into the given output stream.voidencodeAndSign(java.security.PrivateKey key, java.lang.String algorithm, java.lang.String provider, DerOutputStream out)Encodes and signs this proof of escrow.java.lang.Objectget(java.lang.String name)Retrieves the value of an named attribute.java.util.DategetDateOfArchival()Returns the beginning of the escrowed perioid.java.util.Enumeration<java.lang.String>getElements()Retrieves a list of possible attribute names.java.lang.StringgetIssuerName()Retrieves the issuer name.java.util.Enumeration<java.lang.String>getSerializableAttrNames()Retrieves serializable attribute names.java.math.BigIntegergetSerialNumber()Retrieves the serial number.java.lang.StringgetSubjectName()Retrieves the subject name.java.math.BigIntegergetVersion()Retrieves version of this proof.voidset(java.lang.String name, java.lang.Object obj)Sets an attribute value.java.lang.StringtoString()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 EBaseExceptionConstructs 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 EBaseExceptionSets an attribute value.- Specified by:
setin interfaceIAttrSet- Parameters:
name- attribute nameobj- attribute value- Throws:
EBaseException- failed to set attribute
-
get
public java.lang.Object get(java.lang.String name) throws EBaseExceptionRetrieves the value of an named attribute.- Specified by:
getin interfaceIAttrSet- Parameters:
name- attribute name- Returns:
- attribute value
- Throws:
EBaseException- failed to get attribute
-
delete
public void delete(java.lang.String name) throws EBaseExceptionDeletes an attribute.- Specified by:
deletein 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:
getElementsin interfaceIAttrSet- Returns:
- a list of names
-
getSerializableAttrNames
public java.util.Enumeration<java.lang.String> getSerializableAttrNames()
Retrieves serializable attribute names.- Specified by:
getSerializableAttrNamesin interfaceIDBObj- Returns:
- a list of serializable attribute names
-
getVersion
public java.math.BigInteger getVersion()
Retrieves version of this proof.- Specified by:
getVersionin interfaceIProofOfArchival- Returns:
- version
-
getSerialNumber
public java.math.BigInteger getSerialNumber()
Retrieves the serial number.- Specified by:
getSerialNumberin interfaceIProofOfArchival- Returns:
- serial number
-
getSubjectName
public java.lang.String getSubjectName()
Retrieves the subject name.- Specified by:
getSubjectNamein interfaceIProofOfArchival- Returns:
- subject name
-
getIssuerName
public java.lang.String getIssuerName()
Retrieves the issuer name.- Specified by:
getIssuerNamein interfaceIProofOfArchival- Returns:
- issuer name
-
getDateOfArchival
public java.util.Date getDateOfArchival()
Returns the beginning of the escrowed perioid.- Specified by:
getDateOfArchivalin 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 EBaseExceptionEncodes and signs this proof of escrow.- Throws:
EBaseException
-
decode
public void decode(java.io.InputStream in) throws EBaseExceptionDecodes the input stream.- Throws:
EBaseException
-
toString
public java.lang.String toString()
Retrieves the string reprensetation of this proof of archival.- Overrides:
toStringin classjava.lang.Object
-
-