TSTInfopublic class TSTInfo extends Object As defined in Time-Stamp Protocol (TSP)
(http://www.ietf.org/rfc/rfc3161.txt)
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
}
TSAPolicyId ::= OBJECT IDENTIFIER
"tsa [0] GeneralName OPTIONAL" is EXPLICIT and the word EXPLICIT is omitted. |
Fields Summary |
---|
private final int | version | private final String | policy | private final MessageImprint | messageImprint | private final BigInteger | serialNumber | private final Date | genTime | private final int[] | accuracy | private final Boolean | ordering | private final BigInteger | nonce | private final org.apache.harmony.security.x509.GeneralName | tsa | private final org.apache.harmony.security.x509.Extensions | extensions | public static final org.apache.harmony.security.asn1.ASN1Sequence | ACCURACYAccuracy ::= SEQUENCE {
seconds INTEGER OPTIONAL,
millis [0] INTEGER (1..999) OPTIONAL,
micros [1] INTEGER (1..999) OPTIONAL } | public static final org.apache.harmony.security.asn1.ASN1Sequence | ASN1 |
Methods Summary |
---|
public int[] | getAccuracy()
return accuracy;
| public org.apache.harmony.security.x509.Extensions | getExtensions()
return extensions;
| public java.util.Date | getGenTime()
return genTime;
| public MessageImprint | getMessageImprint()
return messageImprint;
| public java.math.BigInteger | getNonce()
return nonce;
| public java.lang.Boolean | getOrdering()
return ordering;
| public java.lang.String | getPolicy()
return policy;
| public java.math.BigInteger | getSerialNumber()
return serialNumber;
| public org.apache.harmony.security.x509.GeneralName | getTsa()
return tsa;
| public int | getVersion()
return version;
| public java.lang.String | toString()
StringBuffer res = new StringBuffer();
res.append("-- TSTInfo:");
res.append("\nversion: ");
res.append(version);
res.append("\npolicy: ");
res.append(policy);
res.append("\nmessageImprint: ");
res.append(messageImprint);
res.append("\nserialNumber: ");
res.append(serialNumber);
res.append("\ngenTime: ");
res.append(genTime);
res.append("\naccuracy: ");
if (accuracy != null) {
res.append(accuracy[0] + " sec, " + accuracy[1] + " millis, "
+ accuracy[2] + " micros");
}
res.append("\nordering: ");
res.append(ordering);
res.append("\nnonce: ");
res.append(nonce);
res.append("\ntsa: ");
res.append(tsa);
res.append("\nextensions: ");
res.append(extensions);
res.append("\n-- TSTInfo End\n");
return res.toString();
|
|