TSTInfo ::= SEQUENCE {
version INTEGER { v1(1) },
policy TSAPolicyId,
messageImprint MessageImprint,
-- MUST have the same value as the similar field in
-- TimeStampReq
serialNumber INTEGER,
-- Time-Stamping users MUST be ready to accommodate integers
-- up to 160 bits.
genTime GeneralizedTime,
accuracy Accuracy OPTIONAL,
ordering BOOLEAN DEFAULT FALSE,
nonce INTEGER OPTIONAL,
-- MUST be present if the similar field was present
-- in TimeStampReq. In that case it MUST have the same value.
tsa [0] GeneralName OPTIONAL,
extensions [1] IMPLICIT Extensions OPTIONAL }
DEREncodableVector seq = new DEREncodableVector();
seq.add(version);
seq.add(tsaPolicyId);
seq.add(messageImprint);
seq.add(serialNumber);
seq.add(genTime);
if (accuracy != null)
{
seq.add(accuracy);
}
if (ordering != null && ordering.isTrue())
{
seq.add(ordering);
}
if (nonce != null)
{
seq.add(nonce);
}
if (tsa != null)
{
seq.add(new DERTaggedObject(true, 0, tsa));
}
if (extensions != null)
{
seq.add(new DERTaggedObject(false, 1, extensions));
}
return new DERSequence(seq);