Skip to main content

Example timestamp query

The following shows a timestamp query with OpenSSL and curl.

  • In line 1 the timestamp request is generated using OpenSSL and saved to ‘request.tsq’.
  • In the next step in line 2, the previously generated request is sent to the timestamp service and the response is saved to ‘response.tsr’.
  • Finally, in line 3 the response is validated against the request using OpenSSL.
openssl.exe ts -query -data loremIpsum.txt -cert -sha256 -no_nonce -out request.tsq
curl.exe -s -S -X POST -H "Content-Type: application/timestamp-query" --data-binary @request.tsq "https://test:test@hs-abnahme.a-trust.at/timestamp/" -o response.tsr
openssl.exe ts -verify -in response.tsr -queryfile request.tsq -CAfile ATrustCaFile.pem