public class SignatureTimeStampToken
extends iaik.asn1.structures.AttributeValue
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 implementation (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));
SignerInfo
Modifier and Type | Field and Description |
---|---|
static iaik.asn1.ObjectID |
oid
The attributeType object identifier of the TimeStampToken attribute.
|
Constructor and Description |
---|
SignatureTimeStampToken()
Empty default constructor.
|
SignatureTimeStampToken(iaik.asn1.ASN1Object obj)
Creates an TimeStampToken from its ASN.1 representation.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(iaik.asn1.ASN1Object obj)
Decodes the given ASN.1 TimeStampToken object
|
boolean |
equals(java.lang.Object obj)
Compares this
TimeStampToken to the specified object. |
iaik.asn1.ObjectID |
getAttributeType()
Returns the OID identifying the TimeStampToken attribute type.
|
int |
hashCode()
Returns a hashcode for this object.
|
iaik.asn1.ASN1Object |
toASN1Object()
Returns this TimeStampToken as ASN1Object.
|
java.lang.String |
toString()
Returns a string representation of this TimeStampToken.
|
public static final iaik.asn1.ObjectID oid
public SignatureTimeStampToken()
public SignatureTimeStampToken(iaik.asn1.ASN1Object obj)
obj
- the TimeStampToken as ASN1Objectpublic boolean equals(java.lang.Object obj)
TimeStampToken
to the specified object.equals
in class java.lang.Object
obj
- the object to compare this TimeStampToken
against.true
, if the given object is equal to this
TimeStampToken
,
false
otherwisepublic int hashCode()
hashCode
in class java.lang.Object
public void decode(iaik.asn1.ASN1Object obj)
obj
- the TimeStampToken as ASN1Objectpublic iaik.asn1.ASN1Object toASN1Object()
public iaik.asn1.ObjectID getAttributeType()
getAttributeType
in class iaik.asn1.structures.AttributeValue
public java.lang.String toString()
toString
in class iaik.asn1.structures.AttributeValue