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.

  1. 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
  2. Validate the time stamp request file.

    openssl ts -query -in hello-world.tsq -text

    Note the Nonce value: the response must contain the same nonce.

  3. 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
  4. Parse the timestamp response to validate the format.

    openssl ts -reply -in hello-world.tsr -text

    The output must show Status: Granted. and the same Nonce as the request.

  5. Verify the timestamp response against the original data, using the chain.pem file.

    openssl ts -verify -in hello-world.tsr -CAfile chain.pem -data hello-world.txt -ignore_critical -purpose any

    Expect Verification: OK.

  6. Verify the response against the timestamp request.

    openssl ts -verify -in hello-world.tsr -CAfile chain.pem -queryfile hello-world.tsq -ignore_critical -purpose any

    Expect Verification: OK.

    The -ignore_critical and -purpose any options 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.