Skip to content

Commit 8203a81

Browse files
committed
user-guide: add doc to verify timestamp with openssl
1 parent 5fc42b7 commit 8203a81

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

doc/user-guide.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,49 @@ This timestamp archive is immutable and cannot be modified or deleted.
127127

128128
The archived zip
129129

130+
Verifying the timestamp
131+
"""""""""""""""""""""""
132+
133+
To verify locally the validity of the timestamp, you can use ``openssl`` with a command similar to:
134+
135+
.. code:: bash
136+
137+
openssl ts -verify -CAfile /etc/ssl/cert.pem -data /path/to/X-timestamped.json -in /path/to/X-timestamped.asn1 -text
138+
139+
If it was signed with a certificate trusted on your system, it should output "Verification: OK". You can also check the token content directly with:
140+
141+
.. code:: bash
142+
143+
openssl ts -reply -in /path/to/X-timestamped.asn1 -text
144+
145+
The output should look like:
146+
147+
.. code-block:: console
148+
149+
Using configuration from /etc/ssl/openssl.cnf
150+
Status info:
151+
Status: Granted.
152+
Status description: Operation Okay
153+
Failure info: unspecified
154+
155+
TST info:
156+
Version: 1
157+
Policy OID: 1.3.6.1.4.1.22177.300.22.1
158+
Hash Algorithm: sha256
159+
Message data:
160+
0000 - 5a 58 7b 86 c3 a6 79 27-35 b8 4d 57 bc 5a 7e 80 ZX{...y'5.MW.Z~.
161+
0010 - 52 89 92 60 0b 8d 03 d4-f2 9e 4a 4c 6d ec 91 a4 R..`......JLm...
162+
Serial number: 0xCDAB07382DF7B1BBE0CC970E93A7625B63F4DB7A
163+
Time stamp: Jul 16 23:07:34 2025 GMT
164+
Accuracy: unspecified
165+
Ordering: no
166+
Nonce: unspecified
167+
TSA: unspecified
168+
Extensions:
169+
170+
The "Time stamp" line gives you the timestamp time. The "Hash Algorithm" and "Message data" should correspond to the digest of the data file (the .json). Compare it with: ``openssl dgst -sha256 /path/to/X-timestamped.json``
171+
172+
130173

131174
6. Blockchain timestamp
132175
^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)