Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to validate if a signed jar contains a timestamp?

After a jar is signed and the -tsa option was used, how can I validate that the time stamp was included? I tried:

jarsigner -verify -verbose -certs myApp.jar

But the output does not specify anything about the time stamp. I'm asking because even if I have a typo in the -tsa URL path, the jarsigner succeeds. This is the GlobalSign TSA URL: http://timestamp.globalsign.com/scripts/timstamp.dll and the server behind it apparently accepts any path (ie. timestamp.globalsign.com/foobar), so in the end I'm not really sure my jar is time stamped or not.

like image 444
user199092 Avatar asked Oct 30 '09 02:10

user199092


People also ask

What is signature timestamp?

The timestamp proves that the contents of the document existed at the time that it was signed, and the digital signature proves that the document has not been changed since then. As a result, time stamps are an important way to ensure the authenticity of digital signatures and documents.

How do I know when my jar certificate expires?

Go to \binc. Run jarsigner -verify -verbose -certs . jard. Check the certificate's "valid from" date under the “CN=International Business Machines Corporation” section.


1 Answers

From https://blogs.oracle.com/mullan/entry/how_to_determine_if_a:

You can use the jarsigner utility to determine if a signed JAR has been timestamped as follows:

jarsigner -verify -verbose -certs signed.jar

where signed.jar is the name of your signed JAR. If it is timestamped, the output will include lines of the following indicating the time it was signed:

[entry was signed on 8/2/13 3:48 PM]

If the JAR is not timestamped, the output will not include those lines.

like image 122
Andrei T Avatar answered Sep 24 '22 12:09

Andrei T