openmicroscopy/openmicroscopy — pull request #2826 by manics (2014-07-17 14:05:14+00:00)
Title: Automatically run jarsigner -verify

Modifies `omero_insight_sign.py` to automatically run `jarsigner -verify` over jars in `lib/insight` after signing. A status line will be printed out for each jar, for example:
```
$ docs/hudson/omero_insight_sign.py lib/keystore omedev OMERO.server-5.0.3-rc0-291-7f4d695-ice35-b74.zip -kp -cp
2014-07-17 14:53:04 Unzipping OMERO.server-5.0.3-rc0-291-7f4d695-ice35-b74.zip
2014-07-17 14:53:09 Signing OMERO.server-5.0.3-rc0-291-7f4d695-ice35-b74/lib/insight/ai_path.jar
...
2014-07-17 14:54:37 Verifying jars
2014-07-17 14:54:37 OMERO.server-5.0.3-rc0-291-7f4d695-ice35-b74/lib/insight/ai_path.jar Signed warning unknown-cert
...
2014-07-17 14:55:07 OMERO.server-5.0.3-rc0-291-7f4d695-ice35-b74/lib/insight/xalan.jar Signed warning unknown-cert
2014-07-17 14:55:07 79/79 signed 79 warn 79 unknown-cert 0 not-timestamped 0 no-manifest 0 expire-soon
2014-07-17 14:55:07 Zipping OMERO.server-5.0.3-rc0-291-7f4d695-ice35-b74-signed.zip OMERO.server-5.0.3-rc0-291-7f4d695-ice35-b74
2014-07-17 14:55:21 Creating OMERO.server-5.0.3-rc0-291-7f4d695-ice35-b74-signed.zip.md5
```

A summary message should be printed out near the end which is all you really need to care about:
```
2014-07-17 14:55:07 79/79 signed 79 warn 79 unknown-cert 0 not-timestamped 0 no-manifest 0 expire-soon
```
In this case the 79/79 jars were signed, but since the certificate is self-signed there were `79 warn` and `79 unknown-cert` statuses.

Note this involves parsing the output of jarsigned which may vary between JDK versions.

There's also a `-skipverify` option.