我一直在努力使用真正的证书制作webstart-maven-plugin。我绝对需要帮助。
当我自我签署JNLP jar时,一切都很好。 为了在启动应用程序时摆脱Oracle的安全警报,我们已经购买了证书。 (顺便说一下,它很贵!)
我配置了keystone并更改了POM以使用新证书对我的应用进行签名,现在我得到了:
[info] jarsigner: java.lang.SecurityException: invalid SHA1 signature file digest for OSGI-OPT/src/org/osgi/framework/PackagePermission.java
插件配置为:
<plugin>
<groupId>org.codehaus.mojo.webstart</groupId>
<artifactId>webstart-maven-plugin</artifactId>
<executions>
<execution>
<!-- bind to phase, I prefer to call it manualls -->
<phase>package</phase>
<goals>
<goal>jnlp-inline</goal> <!-- use jnlp, jnlp-inline or jnlp-single as appropriate -->
</goals>
</execution>
</executions>
<configuration>
<excludeTransitive>false</excludeTransitive>
<libPath>lib</libPath>
<outputJarVersions>true</outputJarVersions>
<dependencies>
</dependencies>
<jnlp>
<outputFile>mix.jnlp</outputFile>
<mainClass>${my_main_class}</mainClass>
</jnlp>
<sign>
<keystore>${basedir}/NitryxKeyStore</keystore>
<keypass>${keypass}</keypass>
<storepass>${storepass}</storepass>
<alias>codesigncert</alias>
<verify>true</verify>
<!-- KEYSTORE MANAGEMENT -->
<keystoreConfig>
<delete>false</delete>
<gen>false</gen>
</keystoreConfig>
</sign>
<pack200>true</pack200>
<gzip>true</gzip>
<outputJarVersions>false</outputJarVersions>
<verbose>true</verbose>
</configuration>
</plugin>
当我运行&#34; mvm clean package&#34;时,它成功签署了许多软件包,如log4j,javamail,我的程序本身,但是当它尝试签署org.osgi.core-4.0.0时。 jar失败了:
...
[INFO] signing: org/osgi/service/url/URLConstants.class
[INFO] signing: org/osgi/service/url/URLStreamHandlerService.class
[INFO] signing: org/osgi/service/url/URLStreamHandlerSetter.class
[INFO] signing: org/osgi/service/url/packageinfo
[debug] jarsigner executable [/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre/bin/jarsigner]
[debug] Executing: /bin/sh -c "cd /Users/rodrigo/Documents/Nitryx/Technical/Projects/Nitryx-Mix/mix-wstart/target/jnlp && /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre/bin/jarsigner -verify -verbose /Users/rodrigo/Documents/Nitryx/Technical/Projects/Nitryx-Mix/mix-wstart/target/jnlp/lib/org.osgi.core-4.0.0.jar"
[info] jarsigner: java.lang.SecurityException: invalid SHA1 signature file digest for OSGI-OPT/src/org/osgi/framework/PackagePermission.java
我花了几个小时谷歌搜索,似乎它与签署两次jar或pack200错误有关。我很感激您提供的任何帮助。
韩国社交协会
答案 0 :(得分:0)
我解决了这个问题,手动打开有问题的.jar并删除清单