trbs / rfc3161ng

A simple client library for cryptographic timestamping service implementing the protocol from RFC3161. Based on python-rfc3161 with some additional fixes.
Other
42 stars 19 forks source link

Document how to verify timestamp using openssl? #10

Closed petterreinholdtsen closed 6 years ago

petterreinholdtsen commented 6 years ago

When using openssl ts with tsget to fetch a trusted timestamp, one can use this command to verifty the signature:

openssl ts -verify -data "" -in "" -CAfile ""

Do you know how to process the result from this python library to be able to verify the timestamp using openssl? If so, could you please document it in the README?

trbs commented 6 years ago

please check 4cfb5c78e77bac790ecde4cff90018fc6db2bf3a is that what you where thinking of ?

petterreinholdtsen commented 6 years ago

Yes, that was exactly the process I was wondering about. I plan to store the timestamps in a database/archive, and want to know how the users of the future can validate them using simple command line tools like openssl.

If this process is documented, for example in the README, I would be very happy. :)

trbs commented 6 years ago

Regretfully return_tsr=True is a bit of a hack, would be better to spend some time creating better objects / interfaces, but this all started out just to have a working Python 3 library :-) (and secondly to also support the server part of rfc3161)

In your case it might be even better to store the raw response.content in the database. Since with return_tsr=True we are basically decoding and re-encoding the response from the server. Both will work.

Would you mind writing an example in the README based on the test case ?

trbs commented 6 years ago

If you have suggestions to improve the documentation in the README please submit a PR 👍