-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timestamping enricher manually verify #187
Comments
Thank you Patrick. This isn't important for me (am just experimenting).. but perhaps for @msramalho? I gave it another shot with http://timestamp.identrust.com with similar results. I noticed I can parse the file fine. # prse the file works
openssl asn1parse -inform DER -in 5f73a60bb02944e48b6c88aa
# view certs works
openssl pkcs7 -inform DER -in 5f73a60bb02944e48b6c88aa -text -print_certs
# verifying doesn't
openssl ts -verify \
-data 9643583e12ed4428992dd84f.txt \
-in 5f73a60bb02944e48b6c88aa \
-CAfile 9474f1e70d304ebeb780cfdb.crt \
-untrusted d472eee1ed6f48d5a395c383.crt \
-untrusted c3a350b3a08c497fbdc9dbf2.crt According the ChatGPT below.: That error appears because openssl ts -reply expects an RFC 3161 “TimeStampResp” structure (TS_RESP) at the top level, whereas the file you have is a PKCS #7 “signedData” time-stamp token. Although both formats contain TST information, they’re not identical wrappers. openssl ts -reply wants a TS response (TSResp), which starts with a PKIStatusInfo (the “status_info”) and may include the full time-stamp token as a separate field. If your goal is just to examine the token contents, you can do so with: openssl asn1parse -inform DER -in 5f73a60bb02944e48b6c88aa or: openssl pkcs7 -inform DER -in 5f73a60bb02944e48b6c88aa -text -print_certs If you want to verify this time-stamp token against an original request and trusted certificates, you’d typically use the openssl ts -verify command, but you must supply the original time-stamp request and the correct trust chain. |
I used the timestamping_enricher with http://timestamp.digicert.com successfully on a file with a single image.
Then I tried to manually verify the response
openssl ts -reply -in e32e6e537c8f4e3c84488748 -text # errors Using configuration from /usr/lib/ssl/openssl.cnf 40A749A3FC7E0000:error:068000A8:asn1 encoding routines:asn1_check_tlen:wrong tag:../crypto/asn1/tasn_dec.c:1188: 40A749A3FC7E0000:error:0688010A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error:../crypto/asn1/tasn_dec.c:349:Type=TS_STATUS_INFO 40A749A3FC7E0000:error:0688010A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error:../crypto/asn1/tasn_dec.c:685:Field=status_info, Type=TS_RESP dave@DESKTOP-3GDSG0D:/mnt/e/Backups/DigitalOcean/testhashing/dia018c$
All looks good with the files produced
Could be all manner of things (filesystem endings - am using WSL2)... just wondering if anything obvious!
The text was updated successfully, but these errors were encountered: