Discuss this help topic in SecureBlackbox Forum
Process the TSP request on the server
To handle the timestamping request, timestamp the data and create the reply, use TElFileTSPServer component (descendant of TElCustomTSPServer).
To handle the request using TElFileTSPServer
you need to first call LoadRequestFromStream() method to load the request.
The next step is to setup parameters of the server, which will be different for each request.
The parameters are:
- SerialNumber property of TElTSPInfo class,
which is accessible via TSPInfo property of TElCustomTSPServer.
The standard specifies, that the SerialNumber must be unique for every reply produced by the server.
The order must be preserved even in case of the server crash or other interruption.
In other words, there should be no responses
with the same SerialNumber, TSAName (see below), and produced for different requests.
The type of the property is ByteArray (array of bytes), which can be as long as 160 bits (20 bytes).
This is done to allow very large values of SerialNumber.
- TSAName property of TElTSPInfo class, which is accessible via TSPInfo property of TElCustomTSPServer.
This property identifies the server, and can be set only once for the session.
TSAName is optional parameter and can be omited.
If you set TSAName,
you must also set TSANameSet property of TElTSPInfo class to true.
TSANameSet tells the server,
if the value of TSAName (even the empty one) must be included into the response.
- Time property of TElTSPInfo class, which is accessible via TSPInfo property
of TElCustomTSPServer.
This is the main parameter, which specifies the time, when the timestamp was created.
The value represents time in UTC (BTW don't confuse UTC with GMT time zone, which uses summer time).
- optionally you can set AccuracySec, AccuracyMilli and AccuracyMicro properties of TElTSPInfo class.
These properties specify, how accurate is the time of the server, i.e. how different it can be from the real time.
If you set any accuracy property, you need to also set AccuracySet property to tell the server that it must include the accuracy value to the response.
Finally use SaveReplyToStream() method of TElFileTSPServer.
This method will compose the response and give you the reply, which should be sent back to the client.
TSP protocol is described in RFC 3161.
In addition to TSP, TElCustomTSPServer handles MS Authenticode timestamping requests.
To check, whether the server is processing MS Authenticode request, read the value of IsAuthenticode property of TElCustomTSPServer class.
MS Authenticode protocol doesn't use the values of Accuracy*, TSPName or SerialNumber.
In fact, only Time is used.
MS Authenticode timestamping protocol is undocumented.
How To articles about TSP (Timestamping Protocol)
Discuss this help topic in SecureBlackbox Forum