by Jürgen "EL BOSSO" Key

RFC 3161 Timestamp Server

Usage

The OpenSSL configuration provided as ressource can be used with OpenSSL to create a certificate request like so:

openssl ts -query -config tsa.conf -cert -sha512 -data <path>/<some_file> -no_nonce -out <request_path>/<request>.tsq

This request can be sent using a HTTP POST request as multipart form data (for example from a file upload form inside a web page):

curl -F "tsq=@<request>.tsq" http://<host>:<port>/ ><reply>.tsr

The file reply.tsr contains the timestamp. Alternatively, this also works with a POST request containing the timestamp query in the body of said request having the correct mime-type:

curl -H "Content-Type: application/timestamp-query" --data-binary '@<request>.tsq' http://<host>:<port>/ ><reply>.tsr

The content of the timestamp (useful for ascertaining the time and date for example) can be displayed for example with the help of OpenSSL command line tools like so:

openssl ts -config tsa.conf -reply -in <reply>.tsr -text

To verify the timestamp, OpenSSL can help too:

openssl ts -verify -config tsa.conf -queryfile <request>.tsq -in <reply>.tsr -CAfile chain.pem

Search timestamp...

Request timestamp...