Skip navigation links

Oracle Security Developer Tools CMS Java API Reference
11g (11.1.1)

E10667-02


oracle.security.crypto.cms
Class TSTInfo

java.lang.Object
  extended by oracle.security.crypto.cms.CMSContentInfo
      extended by oracle.security.crypto.cms.TSTInfo

All Implemented Interfaces:
oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class TSTInfo
extends CMSContentInfo

This class encapulates a CMS object of content type TimeStampTokenInfo.

It is used to store TimeStampToken Information as a part of the PKIX Time Stamp Protocol (RFC 3161).


Constructor Summary
TSTInfo()
          Creates an empty TSTInfo.
TSTInfo(oracle.security.crypto.asn1.ASN1ObjectID policyID, oracle.security.crypto.core.AlgorithmIdentifier messageImprintHashAlgID, oracle.security.crypto.asn1.ASN1OctetString messageImprintHashMsg, oracle.security.crypto.asn1.ASN1Integer serialNumber, java.util.Date genTime, oracle.security.crypto.asn1.ASN1Integer accuracySecs, oracle.security.crypto.asn1.ASN1Integer accuracyMilliSecs, oracle.security.crypto.asn1.ASN1Integer accuracyMicroSecs, boolean ordering, oracle.security.crypto.asn1.ASN1Integer nonce, oracle.security.crypto.cert.GeneralName tsa, java.util.Vector extensions)
          Creates a TSTInfo.
TSTInfo(oracle.security.crypto.asn1.ASN1ObjectID policyID, oracle.security.crypto.core.AlgorithmIdentifier messageImprintHashAlgID, oracle.security.crypto.asn1.ASN1OctetString messageImprintHashMsg, oracle.security.crypto.asn1.ASN1Integer serialNumber, java.util.Date genTime, boolean ordering)
          Creates a TSTInfo.
TSTInfo(java.io.InputStream is)
          Creates a TSTInfo, by reading a BER encoding from the given input stream.

 

Method Summary
 java.math.BigInteger getAccuracyMicroSeconds()
          Returns the time stamp accuracy in microseconds.
 java.math.BigInteger getAccuracyMilliSeconds()
          Returns the time stamp accuracy in milliseconds.
 java.math.BigInteger getAccuracySeconds()
          Returns the time stamp accuracy in seconds.
protected  byte[] getExposedContent()
          Returns the contents octets of the DER encoding of the content field of this CMS object.
 java.util.Vector getExtensions()
          Returns the X509 extensions present in the message.
 java.util.Date getGeneralizedTime()
          Returns the time when this message was generated.
 oracle.security.crypto.core.AlgorithmIdentifier getMessageImprintHashAlgID()
          Returns the Message Imprint Digest Algorithm.
 byte[] getMessageImprintHashMsg()
          Returns the Message Imprint Hash Value.
 java.math.BigInteger getNonce()
          Returns the Nonce.
 boolean getOrdering()
           
 oracle.security.crypto.asn1.ASN1ObjectID getPolicyID()
          Returns the TSA's Policy.
 java.math.BigInteger getSerialNumber()
          Returns the version number.
 oracle.security.crypto.cert.GeneralName getTSA()
          Returns the Time Stamp Authority Identification.
 byte[] getTSTInfoData()
          Returns the encoded TSTInfo.
 java.math.BigInteger getVersion()
          Returns the version number.
 void inputContent(java.io.InputStream is)
          Initialize this object by reading the BER encoding from the specified input stream.
 boolean isDetached()
          Indicate if this object is detached.
protected  void setExposedContent(byte[] expContent)
          Returns the contents octets of the DER encoding of the content field of this CMS object.
 java.lang.String toString()
          Returns a brief text description of this object.
protected  void update()
          Clears the internal output cache.

 

Methods inherited from class oracle.security.crypto.cms.CMSContentInfo
computeDigest, contentTypeName, getContentType, input, inputInstance, isDegenerate, length, output

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

TSTInfo

public TSTInfo()
Creates an empty TSTInfo.

TSTInfo

public TSTInfo(oracle.security.crypto.asn1.ASN1ObjectID policyID,
               oracle.security.crypto.core.AlgorithmIdentifier messageImprintHashAlgID,
               oracle.security.crypto.asn1.ASN1OctetString messageImprintHashMsg,
               oracle.security.crypto.asn1.ASN1Integer serialNumber,
               java.util.Date genTime,
               boolean ordering)
Creates a TSTInfo.
Parameters:
policyID - The policy under which the response was issued.
messageImprintHashAlgID - The message imprint digest algorithm.
messageImprintHashmsg - The message imprint value.
serialNumber - The timestamp token serial number.
genTime - The time at which this time stamp token was created.
ordering - Specify the time stamp token ordering.

TSTInfo

public TSTInfo(oracle.security.crypto.asn1.ASN1ObjectID policyID,
               oracle.security.crypto.core.AlgorithmIdentifier messageImprintHashAlgID,
               oracle.security.crypto.asn1.ASN1OctetString messageImprintHashMsg,
               oracle.security.crypto.asn1.ASN1Integer serialNumber,
               java.util.Date genTime,
               oracle.security.crypto.asn1.ASN1Integer accuracySecs,
               oracle.security.crypto.asn1.ASN1Integer accuracyMilliSecs,
               oracle.security.crypto.asn1.ASN1Integer accuracyMicroSecs,
               boolean ordering,
               oracle.security.crypto.asn1.ASN1Integer nonce,
               oracle.security.crypto.cert.GeneralName tsa,
               java.util.Vector extensions)
Creates a TSTInfo.
Parameters:
policyID - The policy under which the response was issued.
messageImprintHashAlgID - The message imprint digest algorithm.
messageImprintHashmsg - The message imprint value.
serialNumber - The timestamp token serial number.
genTime - The time at which this time stamp token was created.
accuracySecs - The time stamp accuracy in seconds.
accuracyMilliSecs - The time stamp accuracy in milliseconds.
accuracyMicroSecs - The time stamp accuracy in microseconds.
ordering - Specify the time stamp token ordering.
nonce - The nonce from the time stamp request.
tsa - The time stamp authority identification.
extensions - A collection of RFC-2559 extensions (X509Extension</code).

TSTInfo

public TSTInfo(java.io.InputStream is)
        throws java.io.IOException
Creates a TSTInfo, by reading a BER encoding from the given input stream.
Parameters:
is - The input stream.
Throws:
java.io.IOException - If the input is not correctly formatted or an I/O exception occurs while reading from the input stream.

Method Detail

setExposedContent

protected void setExposedContent(byte[] expContent)
Description copied from class: CMSContentInfo
Returns the contents octets of the DER encoding of the content field of this CMS object. The value returned is suitable for input to the "message-digesting" and "content-encryption" process of RFC-2630.
Specified by:
setExposedContent in class CMSContentInfo
See Also:
CMSContentInfo.isDetached()

getExposedContent

protected byte[] getExposedContent()
Description copied from class: CMSContentInfo
Returns the contents octets of the DER encoding of the content field of this CMS object. The value returned is suitable for input to the "message-digesting" and "content-encryption" process of RFC-2630.
Specified by:
getExposedContent in class CMSContentInfo
Returns:
The contents octets or null for a detached CMS object.
See Also:
CMSContentInfo.isDetached()

isDetached

public boolean isDetached()
Indicate if this object is detached.

This method returns true only for an empty ESSReceipt object which should not be used for PKIX-TSP (RFC 3161).

Specified by:
isDetached in class CMSContentInfo
Returns:
true if detached; false otherwise.
See Also:
CMSContentInfo.isDetached()

getVersion

public java.math.BigInteger getVersion()
Returns the version number.
Returns:
The version number.

getPolicyID

public oracle.security.crypto.asn1.ASN1ObjectID getPolicyID()
Returns the TSA's Policy.
Returns:
The policy identifier.

getMessageImprintHashAlgID

public oracle.security.crypto.core.AlgorithmIdentifier getMessageImprintHashAlgID()
Returns the Message Imprint Digest Algorithm.
Returns:
The digest algorithm identifier.

getMessageImprintHashMsg

public byte[] getMessageImprintHashMsg()
Returns the Message Imprint Hash Value.
Returns:
The digest value.

getSerialNumber

public java.math.BigInteger getSerialNumber()
Returns the version number.
Returns:
The serial number.

getGeneralizedTime

public java.util.Date getGeneralizedTime()
Returns the time when this message was generated.
Returns:
The generalized time.

getAccuracySeconds

public java.math.BigInteger getAccuracySeconds()
Returns the time stamp accuracy in seconds.
Returns:
The time deviation in seconds if present or null otherwise..

getAccuracyMilliSeconds

public java.math.BigInteger getAccuracyMilliSeconds()
Returns the time stamp accuracy in milliseconds.
Returns:
The time deviation in milliseconds if present or null otherwise..

getAccuracyMicroSeconds

public java.math.BigInteger getAccuracyMicroSeconds()
Returns the time stamp accuracy in microseconds.
Returns:
The time deviation in microseconds if present or null otherwise..

getOrdering

public boolean getOrdering()

getNonce

public java.math.BigInteger getNonce()
Returns the Nonce.
Returns:
The nonce if present or null otherwise.

getTSA

public oracle.security.crypto.cert.GeneralName getTSA()
Returns the Time Stamp Authority Identification.
Returns:
The GeneralName of the time stamp authority.

getExtensions

public java.util.Vector getExtensions()
Returns the X509 extensions present in the message.
Returns:
A collection of X509Extensionif present or null otherwise..

getTSTInfoData

public byte[] getTSTInfoData()
                      throws java.io.IOException
Returns the encoded TSTInfo.
Returns:
An encoding of this object.
Throws:
java.io.IOException

toString

public java.lang.String toString()
Returns a brief text description of this object.
Overrides:
toString in class java.lang.Object
Returns:
A string description this object.

inputContent

public void inputContent(java.io.InputStream is)
                  throws java.io.IOException
Initialize this object by reading the BER encoding from the specified input stream.
Specified by:
inputContent in class CMSContentInfo
Parameters:
is - The input stream.
Throws:
java.io.IOException - An I/O error occurred or the object encoding was incorrect.

update

protected void update()
Clears the internal output cache. This method is called automatically if the object ever changes, so API users need not be concerned with it. Implementors of subclasses, however, do need to ensure that it gets called when appropriate.
Overrides:
update in class CMSContentInfo

Skip navigation links

Oracle Security Developer Tools CMS Java API Reference
11g (11.1.1)

E10667-02


Copyright © 2005, 2009, Oracle. All rights reserved.