FileDocCategorySizeDatePackage
TSTInfo.javaAPI DocAndroid 1.5 API10206Wed May 06 22:41:06 BST 2009org.apache.harmony.security.x509.tsp

TSTInfo

public 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
ACCURACY
Accuracy ::= 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
Constructors Summary
public TSTInfo(int version, String policy, MessageImprint messageImprint, BigInteger serialNumber, Date genTime, int[] accuracy, Boolean ordering, BigInteger nonce, org.apache.harmony.security.x509.GeneralName tsa, org.apache.harmony.security.x509.Extensions extensions)

        this.version = version;
        this.policy = policy;
        this.messageImprint = messageImprint;
        this.serialNumber = serialNumber;
        this.genTime = genTime;
        this.accuracy = accuracy;
        this.ordering = ordering;
        this.nonce = nonce;
        this.tsa = tsa;
        this.extensions = extensions;
    
Methods Summary
public int[]getAccuracy()

return
Returns the accuracy.

        return accuracy;
    
public org.apache.harmony.security.x509.ExtensionsgetExtensions()

return
Returns the extensions.

        return extensions;
    
public java.util.DategetGenTime()

return
Returns the genTime.

        return genTime;
    
public MessageImprintgetMessageImprint()

return
Returns the messageImprint.

        return messageImprint;
    
public java.math.BigIntegergetNonce()

return
Returns the nonce.

        return nonce;
    
public java.lang.BooleangetOrdering()

return
Returns the ordering.

        return ordering;
    
public java.lang.StringgetPolicy()

return
Returns the policy.

        return policy;
    
public java.math.BigIntegergetSerialNumber()

return
Returns the serialNumber.

        return serialNumber;
    
public org.apache.harmony.security.x509.GeneralNamegetTsa()

return
Returns the tsa.

        return tsa;
    
public intgetVersion()

return
Returns the version.

        return version;
    
public java.lang.StringtoString()

        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();