Un-Signing Applets

Posted by Andy Gavin on Thu, 2005-12-22 19:46

Recently I've done a job where I needed to sign an applet. I got unstuck as some of the jars had inadvertantly got signed with the incorrect signature. However I quite quickly discovered that all the data containing the signatures and the certificate are in the meta-data of the jar. To remove a signature on a jar you can un-jar it, and remove the meta-data portion of the jar (the META-INF directory) and then jar it back up. So in unix it would be something like:

mkdir tmp
cd tmp
jar xvf ../foo.jar
rm -rf META-INF
jar cvf ../foo.jar *

This is providing that you don't have other artifacts in the meta-data.

BlogTag: 

Add new comment