Author |
Message |
25/06/2013 15:55:06
|
slist
Power User
Joined: 20/03/2013 14:13:15
Messages: 37
Location: Berlin
Offline
|
Hi,
we accidentally found out, that the signed JAR jpedal.jar from the CC FX tools contains an invalid signature. You can verify this bis running
Code:
eclnt\libfx> jarsigner -verify -verbose jpedal.jar
My output was the following:
Code:
jarsigner: java.lang.SecurityException: invalid SHA1 signature file digest for org/jpedal/objects/PdfData.class
This would not be a huge problem right now, but some new tests in our build system failed because of the failing JAR verification.
Can you do something to get a properly signed JAR delivered alongside CaptainCasa?
BR
|
|
|
25/06/2013 16:13:47
|
hilka
Power User
Joined: 23/11/2007 09:00:08
Messages: 191
Offline
|
Hello,
we had a similiar issue when validating jar files. But in our case, the jar files were signed twice. Take a look at my post: http://www.captaincasademo.com/forum/posts/list/1831.page
Tobias
|
|
|
25/06/2013 16:23:37
|
slist
Power User
Joined: 20/03/2013 14:13:15
Messages: 37
Location: Berlin
Offline
|
Hi,
thanks for the fast reply! But the JAR is a lib that CC uses. Thus, I cannot alter how it is signed. But right, it has two digests in the Manifest.mf file.
Nevertheless, jarsigner complains. Any idea how to convince the tool that the classes have a valid signature?
BR
|
|
|
25/06/2013 16:33:28
|
hilka
Power User
Joined: 23/11/2007 09:00:08
Messages: 191
Offline
|
You can sign the jar on your own, that's what we do. Or you can wait for the next Update (and hope that the fix is included which I think it will).
Tobias
|
|
|
25/06/2013 16:40:40
|
hilka
Power User
Joined: 23/11/2007 09:00:08
Messages: 191
Offline
|
Found the section it the documentation about the digestalg:
-digestalg algorithm
Specifies the name of the message digest algorithm to use when digesting the entries of a jar file.
See Appendix A of the Java Cryptography Architecture for a list of standard message digest algorithm names. If this option is not specified, SHA256 will be used. There must either be a statically installed provider supplying an implementation of the specified algorithm or the user must specify one with the -providerClass option, otherwise the command will not succeed.
This can be passed to your call of jarsigner. Try this
jarsigner -verify -verbose -digestalg SHA1 jpedal.jar
|
|
|
25/06/2013 16:41:20
|
hilka
Power User
Joined: 23/11/2007 09:00:08
Messages: 191
Offline
|
The documentation comes form Java 7, so I assume that you call jarsigner with Java 7.
|
|
|
25/06/2013 16:44:44
|
slist
Power User
Joined: 20/03/2013 14:13:15
Messages: 37
Location: Berlin
Offline
|
Yes, Java7_u25 in use. But
Code:
jarsigner: java.lang.SecurityException: invalid SHA1 signature file digest for org/jpedal/objects/PdfData.class
We use CC version 4_0_20130527.
|
|
|
25/06/2013 16:54:37
|
hilka
Power User
Joined: 23/11/2007 09:00:08
Messages: 191
Offline
|
Well, then I guess you will have to wait for the next update I guess...
|
|
|
26/06/2013 10:46:11
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5555
Offline
|
Hi,
Tobias was right with the assumption that the jar file was signed twice...
We removed the original signature now, so the CaptainCasa one is the one left.
Fix is available in next update.
Thanks + regards!
Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
01/07/2013 15:29:17
|
slist
Power User
Joined: 20/03/2013 14:13:15
Messages: 37
Location: Berlin
Offline
|
Hi,
okay, the second signature has been removed now, but the JAR signer still complains about an invalid signature. Don't know why.
BR
|
|
|
|