DigiStamp.com

com.digistamp.tsp
Class TSAClient

java.lang.Object
  extended by com.digistamp.tsp.TSAClient

public class TSAClient
extends java.lang.Object

Time Stamp Authority Client interface implementation using DigiStamp time stamp servers. This local proxy object the communicates with Internet based time stamp service to return a RFC 3161 time stamp. Provides failover capability among multiple time stamp servers.


Field Summary
static int TOKEN_SIZE_ESTIMATE
          Set a default token size of 3072.
 
Constructor Summary
TSAClient()
          Constructor.
TSAClient(int tokenSizeEstimate)
          Constructor.
 
Method Summary
 byte[] getTimeStampToken(byte[] imprint)
          Get RFC 3161 timeStampToken.
 int getTokenSizeEstimate()
          Get the time stamp token size estimate.
static void main(java.lang.String[] args)
          Execute the test.
 void setConfigProperties(java.util.Properties aProperties)
          DigiStamp local proxy configuration for failover and account access.
 void setReporter(Reporter aReporter)
          Supplying a Reporter object allows the processing to report communications events.
 void setTrustedRootCertificate(java.security.cert.X509Certificate rootCert)
          After the signature of the time stamp is verified, should the system check to see if that public key certificate that was used to verify the signature is trusted?
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOKEN_SIZE_ESTIMATE

public static int TOKEN_SIZE_ESTIMATE
Set a default token size of 3072.

Constructor Detail

TSAClient

public TSAClient()
Constructor. Uses a default TOKEN_SIZE_ESTIMATE.


TSAClient

public TSAClient(int tokenSizeEstimate)
Constructor.

Parameters:
tokenSizeEstimate - int - estimated size of the received DER encoded time stamp token
Method Detail

getTimeStampToken

public byte[] getTimeStampToken(byte[] imprint)
                         throws java.lang.Exception
Get RFC 3161 timeStampToken.

Parameters:
imprint - byte[] - the SHA-1 data imprint to be time-stamped
Returns:
byte[] - encoded, TSA signed data of the timeStampToken
Throws:
java.lang.Exception - - TSA request failed - Time stamp did not verify correctly with public key

getTokenSizeEstimate

public int getTokenSizeEstimate()
Get the time stamp token size estimate. Implementation must return value large enough to accommodate the entire token returned by getTimeStampToken() _prior_ to actual getTimeStampToken() call. See default TOKEN_SIZE_ESTIMATE


main

public static void main(java.lang.String[] args)
Execute the test.


setConfigProperties

public void setConfigProperties(java.util.Properties aProperties)
DigiStamp local proxy configuration for failover and account access. Default is file "DigiStamp.properties".

DigiStamp configuration properties. An example configuration file was provided in "DigiStamp.properties"; you will need to add your account number and password to the file "DigiStamp.properties". More configuration details are here: TSAConfig.


setReporter

public void setReporter(Reporter aReporter)
Supplying a Reporter object allows the processing to report communications events. A textual description of the steps taken in communication. For example: If you use the reporter feature and you are using multithreading then each time stamp request should use different instance of this class.

Parameters:
aReporter - dgs.tlkt.Reporter

setTrustedRootCertificate

public void setTrustedRootCertificate(java.security.cert.X509Certificate rootCert)
After the signature of the time stamp is verified, should the system check to see if that public key certificate that was used to verify the signature is trusted? Does the public key certificate chain to a trust root CA.

If that checking is desired then this method must be called and this object given a root certificate that is trusted by the user.

Trusted Root CA certificates are also contained in the Java trusted keystore.

If this method is called with a parameter of NULL then this tells the system to check only Java installation's trusted keystore


Copyright 2000-2010 DigiStamp, Inc.