iaik.smime.attributes
Class SignatureTimeStampToken

java.lang.Object
  extended by iaik.asn1.structures.AttributeValue
      extended by iaik.smime.attributes.SignatureTimeStampToken
All Implemented Interfaces:
ASN1Type

public class SignatureTimeStampToken
extends AttributeValue

The SignatureTimeStampToken attribute.

The X.509 Time-Stamp Protocol (TSP) (RFC 3161) specifies the SignatureTimeStampToken attribute to be included as an unsigned attribute in a SignerInfo to prove that the signature was created before a given time.

 SignatureTimeStampToken ::= TimeStampToken

 id-contentType OBJECT IDENTIFIER ::= { iso(1) member-body(2)
        us(840) rsadsi(113549) pkcs(1) pkcs9(9) smime(16) aa(2) 14 }
 
This class provides a generic implementation of the SignatureTimeStampToken attribute and treats the TimeStampToken as general ASN.1 object only. A TSP protocol implementaion (like IAIK-TSP may be used for parsing the ASN.1 TimeStampToken to get its TSTInfo values.

When creating a SignatureTimeStampToken attribute the TimeStampToken has to be supplied as ASN1Object, e.g.:

 ASN1Object asn1TST = ...;
 SignatureTimeStampToken timeStampToken = new SignatureTimeStampToken(asn1TST);
 // add the SignatureTimeStampToken as unsigned attribute to the SignerInfo:
 signerInfo.addUnsignedAttribute(new Attribute(timeStampToken));
 

See Also:
SignerInfo

Field Summary
static ObjectID oid
          The attributeType object identifier of the TimeStampToken attribute.
 
Constructor Summary
SignatureTimeStampToken()
          Empty default constructor.
SignatureTimeStampToken(ASN1Object obj)
          Creates an TimeStampToken from its ASN.1 representation.
 
Method Summary
 void decode(ASN1Object obj)
          Decodes the given ASN.1 TimeStampToken object
 boolean equals(java.lang.Object obj)
          Compares this TimeStampToken to the specified object.
 ObjectID getAttributeType()
          Returns the OID identifying the TimeStampToken attribute type.
 int hashCode()
          Returns a hashcode for this object.
 ASN1Object toASN1Object()
          Returns this TimeStampToken as ASN1Object.
 java.lang.String toString()
          Returns a string representation of this TimeStampToken.
 
Methods inherited from class iaik.asn1.structures.AttributeValue
getName, multipleAllowed
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

oid

public static final ObjectID oid
The attributeType object identifier of the TimeStampToken attribute. The corresponding OID string is "1.2.840.113549.1.9.16.2.14".

Constructor Detail

SignatureTimeStampToken

public SignatureTimeStampToken()
Empty default constructor. Required for dynamic object creation. Shall NOT be used by an application.


SignatureTimeStampToken

public SignatureTimeStampToken(ASN1Object obj)
Creates an TimeStampToken from its ASN.1 representation.

Parameters:
obj - the TimeStampToken as ASN1Object
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compares this TimeStampToken to the specified object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare this TimeStampToken against.
Returns:
true, if the given object is equal to this TimeStampToken, false otherwise

hashCode

public int hashCode()
Returns a hashcode for this object.

Overrides:
hashCode in class java.lang.Object
Returns:
a hashcode for this object

decode

public void decode(ASN1Object obj)
Decodes the given ASN.1 TimeStampToken object

Parameters:
obj - the TimeStampToken as ASN1Object

toASN1Object

public ASN1Object toASN1Object()
Returns this TimeStampToken as ASN1Object.

Returns:
this TimeStampToken as ASN1Object

getAttributeType

public ObjectID getAttributeType()
Returns the OID identifying the TimeStampToken attribute type.

Specified by:
getAttributeType in class AttributeValue
Returns:
the OID identifying the TimeStampToken attribute type.

toString

public java.lang.String toString()
Returns a string representation of this TimeStampToken.

Specified by:
toString in class AttributeValue
Returns:
this TimeStampToken as string

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK-CMS 5.1, (c) 2002 IAIK, (c) 2003 - 2010 SIC