[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
invalid SHA1 signature file digest  XML
Forum Index -> Development
Author Message
hilka

Power User

Joined: 23/11/2007 09:00:08
Messages: 191
Offline

Hello Community,

we have custom components integrated in on client side of Captain Casa, so we have our build server handle the signing of the jar files along with the other client side jar files that are part of the Captain Casa delivery.

After switching from Java 6 to Java 7 on our jenkins build server, suddenly our application did not start any more. The error message looked like this (the class does not matter):

java.io.IOException: invalid SHA1 signature file digest for javax/servlet/ServletRequestWrapper.class
at com.sun.deploy.cache.CacheEntry$10.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
.....

We found out that the reason for this is that the default sigining algorithm was changed from SHA-1 to SHA-256 between Java 6 and Java 7. In some jars, the Manifest file contained two signatures, one for SHA1 and one for SHA256, like this:

.....
Name: javax/servlet/ServletRequestWrapper.class
SHA1-Digest: goVnVYplb8EGVWBCMZ5GWeBAOyM=
SHA-256-Digest: 3YDDRnyrJT9CDOOpt4ZGduda6FnsFuvT3UsOs+a1TUo=
.....

The solution was to adjust our jar signer to explicitly use SHA1 as digest algorithm. Just add "-digestalg SHA1" to your signjar call (in ant it would be the digestalg property of the signjar task).

Hope this helps you get around these issues.

Tobias
hilka

Power User

Joined: 23/11/2007 09:00:08
Messages: 191
Offline

And by the way: you have to switch to Ant 1.8.3 or higher if you want to use the digestalg property.
rheinrichs

Power User
[Avatar]

Joined: 08/05/2009 10:05:36
Messages: 209
Offline

thx, our problem is now solved, too.
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team