The DgsTimeStampRequest function is given a digital signature or data
file, communicates with DigiStamp time stamp servers and returns a Time Stamp. The
Time Stamp is returned as a PKCS 7 encoded message. The time stamp that includes the
supplied hash and optional nonce. The time stamp service signs the hash with the current
time and returns a signed CMS structure. Requires MicroSoft CryptoAPI.
DGS_TIMESTAMP_PARA pSignPara, // in/out
CRYPT_ALGORITHM_IDENTIFIER hashAlgorithmID, // in
LPSTR contentType, // in
BYTE *content, // in
DWORD cContent, // in
DWORD dwIndex, // in
LONG nonce, // in
BYTE *pbTimeStampBlob, // out
DWORD *pcbTimeStampBlob, // out
LPSTR time // out
- Pointer to DGS_TIMESTAMP_PARA structure containing the
time-stamp service parameters.
- Identifier of the hash algorithm that will be used to create the hash of the
content. Current release supports only SHA-1 and no parameter.
- OID of the content type. Currently release supports only a PKCS 7
signed message 1.2.840.11318.104.22.168, the literals "DATA" and "NO
DIGEST". "DATA" indicates that the function should calculate
the message digest of the content supplied. "NO DIGEST" indicates that the content is the result of the pre-executing the message digest
- The contents to be time stamped.
- The size of the buffer that contains content.
- Index to the SignerInfo signature to be time stamped. The parameter is
applicable when contentType is a PCKS 7 signed message. Current release
supports only 0, the first signature in the set.
- Optional random number to be included in the time stamp. If supplied,
process will confirm that the server response includes the nonce value. The current version of the C toolkit supports only up to a 4 byte number (the Java toolkit version support full 20 byte nonce.) This will be upgraded in the next release.
- The encoded time stamp token is a PKCS 7 message.
- Pointer to a DWORD specifying the size, in bytes, of the pbTimeStampBlob
buffer. When the function returns, this variable contains the size, in bytes, of the
signed and encoded message.
- This parameter can be NULL to set the size of this information for memory
allocation purposes. On output, the this parameter is updated to reflect the actual
size of the data copied to the pbTimeStampBlob.
- The time (GMT) that was included in the time stamp. Returned a separate
data item for convenience. If not NULL then the memory size provided
must be 20 and will be returned with a null terminator.
If the function succeeds, the return value is nonzero (TRUE).
If the function fails, the return value is zero (FALSE).
This function call subordinate functions DgsTSHash.,
DgsTSResponse and DgsTsGetParam.
Error messages from these functions can also be returned.
||If the buffer specified by the pbTimeStampBlob parameter is
not large enough to hold the returned data, the function sets the ERROR_MORE_DATA code,
and stores the required buffer size, in bytes, into the variable pointed to by pcbTimeStampBlob.
||Unsupported Hash Algorithm
||Unsupported content type.
||Unable to extract signature from input PCKS 7 signed
message. A prerequisite to performing hash
28 January, 2005