SecureTime API Toolkit
C / C++ Language version 

DigiStamp SecureTime API Toolkit README FILE
Toolkit Version 2.1 January 28, 2005
(C) Copyright 2000-2010 DigiStamp, Inc.

Thank you for your interest in the SecureTime toolkit. This document contains information on how to build the test programs and using the toolkit in your application.

You will need to establish an account with Digistamp to request time stamps from the server. Account set-up is at the


The toolkit library allows to add time stamping capability to your existing application. The toolkit performs the functions:
  • File hash generation
  • Creating a time stamp request
  • Communicating the time stamp request to the DigiStamp server via the Internet (you configure the rules for automatic failover to time stamp Internet sites)
  • Decoding the time stamp response
  • Outputting a CMS record structure that contains the time stamp
  • Verifying the time stamp authenticity
Interface Documentation links Environment

Toolkit supporting Microsoft CryptoAPI

Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0 SP4 and later.
Windows XP, Windows 2000 Professional, Windows NT Workstation 4.0 SP4 and later, Windows Me, or Windows 98

Windows 95 with Internet Explorer 3.02 or later
Requires crypt32.lib in path.

other platforms primitives for C

Your environment requires:
1. Internet communications to transmit the time stamp request.
2. (Optional)  PKCS7 signature verification

To register for the toolkit beta program, please use our feedback form or e-mail and provide us with information about your project.

License Terms

Delivered with the software is a file DigistampLicense.html. Please review the license carefully. You must accept this license or delete your copies of the software. If you have questions or concerns about the license please contact DigiStamp before proceeding with use of the toolkit.

Support Requests, Bug Reports, and Requests for Enhancements

Internet Email:

Building and testing the toolkit

Please follow the instruction in this file to build the Sample programs for DigiStamp SecureTime toolkit.

You will need to install the MS Platform SDK. The toolkit was tested with the February 2003 release. Your include and lib path will need to have the Platform SDK before Visual Studio.

Once you have unzip the zip file into your chosen folder, change directory to SamplePrograms. There are two sample programs egMSClient.c and egMSClientSigSig.c Change directory to the desired sample program and build the sample program as follow:

To build the egMSClient:

nmake -f egMSClient.mak

This will build the release version(non-debug) version of the sample egMSClient using the DGSToolkit.lib library. Alternativly execute the following to build the debug version using the DGSToolkit_debug.lib library:

namke -f egMSClient.mak CFG=Debug

In order to clean the the sample directories:

nmake -f egMSClient.mak clean

o build the egMSClientSigsig:

nmake -f egMSClientSig.mak

This will build the release version(non-debug) version of the sample egMSClientSig using the DGSToolkit.lib. Alternatively execute the following to build the debug version using the DGSToolkit_debug.lib library:

namke -f egMSClientSig.mak CFG=Debug

In order to clean the the sample directories:

nmake -f egMSClientSig.mak clean

Running the sample applications:

Before running the sample programs make sure that all necessary certificates are installed on your machine. In order to get these certificates go to DigiStamp web site at Once you have downloaded the current certificates install these certificates on your machine. As you are going through the installation of the certificates make sure that Time Stamp certificates are installed in the personal folder. See extended description at:

To run the sample programs execute the following:

egMSClient <your account ID> <password>
egMSClientSig <your account ID> <password>

Testing "retry" with TSATEST3 The toolkit includes logic to automatically retry your request if a DigiStamp server is temporarily not available. The server designation TSATEST3 is always "not available". You can use this in your test configuration to test behavior of the toolkit when a retry is required.

Change History

Changes from version 1.1.6 to version 2.1 (January 2005)

The DigiStamp TSA service now reports time in milliseconds and includes a
certificate chain-of-authority to document the audit process.

The single interface change was in the verb DgsTimeStampRequest. The tsTime parameter now requires 20 bytes and is returned with a null terminator. Updated example code:
if(!(tsTime = (BYTE *)malloc(20))) // for time in GMT
DgsHandleError("tsTime Memory allocation failed.");

... DgsTimeStampRequest ( ..., tsTime )

Changes from version 1.1.5 (June 2001)

Added processing to recognize Win2000 changes in MS CryptoAPI processing.

Changes from version 1.1.4

Added processing for policy attribute of TSTInfo

Repaired bug where retry was not occuring in certain situations.

Changes from version 1.1.3

Repaired performance bug when use SSL connection support.

Upgraded to Draft 10 of the IETF Time Stamp Protocol. This resulted
in changes to 'clock accuracy' decoding in low level function

Nonce value in parameter of DgsTimeStampRequest was converted to
unsigned long, from signed long. The next release will enhance nonce
value to include up to a 20 byte integer nonce value.

Changes from version 1.1.2

Correct memory leak in execution path where account/password do not match

Changes from version 1.1.1 (August 2000)

C++ support added to header files
DigiStamp end-user license revised
Documentation for "contentType" revised to be more descriptive


Home   Feedback      Related Links   Contact Us   Mailing List    Privacy Statement
Copyright 2000-2005,   DigiStamp, Inc.
All Rights Reserved
SecureTime, IPProtector, and e-TimeStamp  are service marks of the DigiStamp, Inc.