Test the integration
Testing consists of time stamping a file as described in the Entrust Timestamping Authority 2.1 Deployment Guide, section Testing the timestamping service.
The time stamping request is sent to the TSA endpoint, http://<edm-host>/tsa/<issuer>, where <edm-host> is the EDM hostname or IP address and <issuer> is the issuer ID configured in Configure the Entrust Timestamping Authority.
The test uses the CA chain created in Export your root CA certificate.
-
Select a file to be time stamped, and create a
tsq(time stamp request) file that contains its hash.echo "hello, world" > hello-world.txt openssl ts -query -data hello-world.txt -sha512 -cert -out hello-world.tsq -
Validate the time stamp request file.
openssl ts -query -in hello-world.tsq -textNote the
Noncevalue: the response must contain the same nonce. -
Issue the time stamp request.
curl -H "Content-Type: application/timestamp-query" -H "Accept: application/timestamp-reply" --data-binary "@hello-world.tsq" http://<edm-host>/tsa/<issuer> --output hello-world.tsr -
Parse the timestamp response to validate the format.
openssl ts -reply -in hello-world.tsr -textThe output must show
Status: Granted.and the sameNonceas the request. -
Verify the timestamp response against the original data, using the
chain.pemfile.openssl ts -verify -in hello-world.tsr -CAfile chain.pem -data hello-world.txt -ignore_critical -purpose anyExpect
Verification: OK. -
Verify the response against the timestamp request.
openssl ts -verify -in hello-world.tsr -CAfile chain.pem -queryfile hello-world.tsq -ignore_critical -purpose anyExpect
Verification: OK.The -ignore_criticaland-purpose anyoptions relax certificate checks so that the test works with the test CA chain. For production verification, use the options that your applications require and confirm that the TSA certificate carries the Time Stamping extended key usage.