giovedì, novembre 12, 2015

How to generate and send an time stamp request ?

Hi,

today the problem is how to generate and send a time stamp request to a Time Stamp Authority (TSA).

For this quick guide I use free time stamp service (limited to 5 timestamps per day and IP) available on https://tsa.safecreative.org/

Alright, cut the chatter, men. Enjoy!

First we have to create the file you will want to timestamp:

# echo "This is the content of test file." > inputfile.txt

Then generate a timestamp request that we want to sign:

# openssl ts -query -data inputfile.txt -cert -sha256 -no_nonce -out request.tsq

Then send the request to timestamp server

# curl -k  -H "Content-Type: application/timestamp-query" --data-binary @request.tsq "https://tsa.safecreative.org/" > inputfile.txt.tsr

If all it's fine the content of inputfile.txt.tsr is the response of your request.

If you want to verify the content you can do:


# curl -k  -H "Content-Type: application/timestamp-query" --data-binary @request.tsq "https://tsa.safecreative.org/" > inputfile.txt.tsr





mercoledì, novembre 11, 2015

How to change editor for for crontab file

If you want to specify an editor, when opening crontab file. And not just use the default for your system. You need to use VISUAL environment variable.

Export the value of VISUAL and then run crontab -e command.

# export VISUAL=nano; crontab -e

Of course you need to have vim or nano installed in your system if you want to use them.