出版商名称未经验证,因此列为未知

The publisher name is unverified and therefore listed as UNKNOWN

我有一个旧的 java 网络应用程序。客户端计算机正在使用 JRE 6 访问此应用程序,但我需要将它们迁移到 JRE 8。 在客户端 (windows) 安装 JRE 8 后,当我第一次 运行 应用程序时,我收到与名为 jacob.jar 的文件相关的安全警告消息:The出版商名称未经验证,因此列为未知...

我可以勾选复选框并单击 运行,之后该警告不会出现在该浏览器会话中,但是 如何摆脱完全关闭警告消息,这样即使在会话中首次启动时也不会出现?

我尝试过的东西

MANIFEST.MF 添加了 PermissionsCodebaseApplication-Name 属性并制作了我自己的证书:

keytool -genkey -alias webutil2 -keystore example.keystore
<Entering data is omitted>
keytool -export -keystore example.keystore -alias webutil2 -file cert3.csr

使用我自制的证书手动签名jacob.jar

> sign_webutil.bat jacob.jar
Signature verified OK    jarsigner -verify jacob.jar    jar verified.
Warning:    This jar contains entries whose certificate chain is not validated.    This jar contains signatures that does not include a timestamp. Without a timestamp, users may not be able to validate this jar after    the signer certificate's expiration date (2017-05-14) or after any    future revocation date.
Re-run with the -verbose and -certs options for more details.

我还将我的证书添加到 Signer CA 列表并确认是通过 Control Panel > Java > Security > Manage Certificates > System 添加的:

C:\Program Files\Java\jre1.8.0_66\lib\security> keytool -import -trustcacerts -alias root -file cert3.csr -keystore cacerts

但在我从 Java 控制面板重置警告提示后,警告仍然出现。

您将需要一份官方证书,而不是自签名证书。此外,证书必须是允许对软件进行签名的证书;请记住,这些往往比为网站或电子邮件制作的贵得多。

编辑:this post 还建议将您自己的自定义 CA 添加到 Java 自己的证书路径也可能是一个可行的替代方案。