SignServer issues RFC 3161 timestamp tokens when you configure a Timestamp Signer. Send timestamp requests to the Worker over HTTP or HTTPS. Many tools support the protocol, so you can timestamp with SignClient, OpenSSL, SignTool, jarsigner, Adobe Acrobat, Microsoft Office, and other clients.
A timestamp token proves that data existed before a specific time. Timestamps extend the useful life of a signature beyond the expiration of the signer certificate. SignServer can also automatically add timestamps by requesting a timestamp token over the signature when you set the TSA_WORKER or TSA_URL property in a Signer Worker.
SignServer as TSA Component
SignServer can be operated as a Time Stamp Authority (TSA) unit, issuing digitally signed timestamps compliant with:
-
RFC 3161
-
Microsoft Authenticode
-
ETSI/eIDAS for Qualified Electronic Time-Stamps (EU Regulation No 910/2014)
As SignServer is not a TSA by default, your organization must implement separate policies and procedures.
About the Timestamp Signers
The Timestamp Signers are the SignServer Workers that generate RFC 3161 time-stamp tokens. Choose the Signer type that matches the clients and the requirements:
|
Signer |
Use when |
Class |
|---|---|---|
|
Clients send RFC 3161 requests. Use as the default. |
|
|
|
Extended Timestamp Signer ENTERPRISE |
Tokens need the qualified time-stamp extension from EU regulation 910/2014. Set |
|
|
Clients use the legacy Authenticode format (SignTool |
|
Request URLs
Send requests to one of these URLs. Replace the host and the Worker name or ID.
-
http://<host>/signserver/tsa?workerName=<worker name> -
http://<host>/signserver/process?workerId=<worker ID>
Certificate Requirements
The Timestamp Signers require a Time-Stamping Authority (TSA) certificate with the following:
-
An Extended Key Usage (EKU) extension.
-
The EKU extension marked as
critical. -
The timeStamping key purpose ID (
1.3.6.1.5.5.7.3.8) as the only key purpose ID.
For more information, see Signer Certificate Requirements.
SignServer TimeMonitor
Use the SignServer TimeMonitor to make the Timestamp Signer issue tokens only while the server clock is in sync. TimeMonitor is an application that runs in its own process, outside SignServer. TimeMonitor sends NTP queries to a time server, compares the local clock with the time server, and publishes the result to SignServer as the status property TIMESOURCE0_INSYNC.
For more information, see SignServer TimeMonitor Application.
Timestamp with SignClient
Use the SignClient timestamp command to test a Timestamp Signer, to timestamp a file, and to verify a stored response. For a full overview of the timestamp command, see timestamp.
Test the Signer
In the SignServer directory, run the command:
bin/signclient timestamp -url "http://tsa.example.com:8080/signserver/tsa?workerName=TimeStampSigner"
Without -instr or -infile, SignClient runs in test mode and generates the message to timestamp. Use -sleep <milliseconds> to change the one-second pause between requests.
Read the output. SignClient sends one request every second and prints the response. A successful response shows the status Operation Okay.
Timestamp a File
Run the command:
bin/signclient timestamp -url "http://tsa.example.com:8080/signserver/tsa?workerName=TimeStampSigner" -infile myfile.txt -outrep myfile.tsr -certreq
The -certreq asks the Signer to include the signer certificate in the token. The -instr "text" timestamps a string instead of a file. -outreq <file> stores the request.
Keep myfile.tsr together with myfile.txt.
Verify a Stored Response
Verify the token against:
bin/signclient timestamp -verify -inrep myfile.tsr -cafile trusted-certificates.pem
bin/signclient timestamp -verify -inrep myfile.tsr -signerfile tsa-signer.pem
The -verify option sends no request to the TSA. Use -base64 when the stored response is base64-encoded.
To print the contents of a request or a response without contacting the server:
bin/signclient timestamp -print -inreq query.tsq
bin/signclient timestamp -print -inrep myfile.tsr
Timestamp with Other Signers
Several SignServer Signers request a timestamp token for the signature they create. Examples are the PDF Signer, MS Signer, MS Authenticode Signer, and the JArchive Signer. Add a timestamp to the signature with one of two Worker properties:
|
Property |
Use when |
Value |
|---|---|---|
|
|
The Timestamp Signer runs in the same SignServer instance. |
Worker name or worker ID of the Timestamp Signer. |
|
|
The Timestamp Signer runs on another server, or another TSA issues the timestamp. |
URL of the TSA. |
Set only one of the two properties. SignServer rejects a Worker that has both.
Configure a PDF Signer to Timestamp
-
In the Admin Web, click Workers and select the PDF Signer.
-
Click the Configuration tab.
-
Click Add, enter the property name
TSA_WORKER, and enter the name of the Timestamp Signer as the value. -
Click Submit.
-
Sign a test document and open the document in a PDF reader. Confirm that the signature shows a timestamp.
To use a TSA on another server, enter TSA_URL with the URL of the TSA in step 3. Do not use a localhost URL for a Timestamp Signer in the same instance. A localhost URL can cause thread deadlocks under high load.
Timestamp with OpenSSL and cURL
Use OpenSSL to create the request and to verify the response. Use cURL to send the request over HTTP or HTTPS.
-
Create a file to timestamp:
echo "Something to time-stamp" > myfile.txt -
Create the timestamp request.
-certasks the TSA to include the Signer certificate in the response:openssl ts -query -data myfile.txt -cert -sha256 -out request.tsq -
Send the request to the Timestamp Signer:
curl -H "Content-Type: application/timestamp-query" --data-binary @request.tsq "https://tsa.example.com/signserver/tsa?workerName=TimeStampSigner" -o response.tsr -
Verify the response against the original request. The
trusted-certificates.pemcontains the TSA root certificate.openssl ts -verify -queryfile request.tsq -in response.tsr -CAfile trusted-certificates.pem -
Confirm that the output reads
Verification: OK. -
Optional: Print the contents of the response:
openssl ts -reply -in response.tsr -text
When the TSA certificate chain has intermediate certificates that the response does not include, add them with -untrusted <file>. Keep the nonce in the request. The -no_nonce option removes replay protection.
Timestamp Signing with MS SignTool
By default, MS SignTool expects a MS Authenticode Timestamp Signer. However, using the Timestamp Signer is recommended.
For more information, see the MS SignTool documentation.
Use a Timestamp Signer
-
Set the Signer
TSAproperty toRFC#3161. -
In SignTool, use the
/trflag to specify the URL of the timestamp server.
Use a MS Authenticode Timestamp Signer
Though you can set the TSA as Authenticode and use the MS Authenticode Timestamp Signer, this is the legacy format and not preferable. In SignTool, use the /t flag to specify the URL of the timestamp server.