Help for timestamping via TSA

582 views
Skip to first unread message

ezio99ez

unread,
Jul 14, 2022, 4:53:31 AM7/14/22
to Automate
I have tried many ways to implement timestamping through the site https://www.freetsa.org/index_en.php#tap-stamp.
Using Javascript it is really difficult to use hashing libraries, through a special script.
I tried the interact block to interact with the web page, but it doesn't always respond correctly.
Is it possible to implement these three commands?

1 - Create a tsq (TimeStampRequest) file, which contains a hash of the file you want to sign.

$ openssl ts -query -data file.png -no_nonce -sha512 -cert -out file.tsq

2 - Send the TimeStampRequest to freeTSA.org and receive a tsr (TimeStampResponse) file.

$ curl -H "Content-Type: application/timestamp-query" --data-binary '@file.tsq' https://freetsa.org/tsr > file.tsr

3 - With the public Certificates you can verify the TimeStampRequest.

$ openssl ts -verify -in file.tsr -queryfile file.tsq -CAfile cacert.pem -untrusted tsa.crt

Thanks in advance.

Henrik "The Developer" Lindqvist

unread,
Jul 14, 2022, 11:13:10 AM7/14/22
to Automate
The site seems to have an REST API so there should be no need for the Interact block, simply use the HTTP request block, maybe something like:
Use the Shell command block to execute any openssl command, if it's even installed.

ezio99ez

unread,
Aug 1, 2022, 11:34:26 AM8/1/22
to Automate


Hashing via https://www.freetsa.org/index_en.php#tap-stamp *with http* is not allowed.

I do not refer to screenshot section.

The problem is to implement $ openssl ts -query -file.jpg -no_nonce -sha512 -cert -out file.tsq

No way to act on button "Choose a file..." -> using INTERACT makes a non-sense document path selection clicks, not working and not reliable !

Any ideas ? No way to click this  cursed  button ???

Henrik "The Developer" Lindqvist

unread,
Aug 1, 2022, 4:49:41 PM8/1/22
to Automate
As said, try using the Shell command block to execute: openssl ts -query -file.jpg -no_nonce -sha512 -cert -out file.tsq

Using the Interact block to simulate a click on a webpage "upload" button, and to select a file will be very difficult and unreliable.
I suggest you find some other way of signing your documents, preferably with a proper toolset, not just a webpage.

ezio99ez

unread,
Aug 3, 2022, 10:35:40 AM8/3/22
to Automate
Tried. Give me java.io. IOException error  - error 13 permission denied.

Henrik "The Developer" Lindqvist

unread,
Aug 4, 2022, 5:06:58 PM8/4/22
to Automate
Maybe the openssl command isn't installed on your device, or you haven't granted file privileges, e.g. "manage all files", "modify or delete the contents of your shared storage", so the file.jpg can't be read or file.tsq written.
Reply all
Reply to author
Forward
0 new messages