Java webstart 说我的应用程序使用自签名证书,但我使用的是 COMODO 代码签名证书

Java webstart says my app uses a self signed certificate, but I used a COMODO code signing certificate

我买了一个 COMODO code signing certificate 并用它来签署我的 java webstart 应用程序。

主要问题:java 8 甚至支持 COMODO 代码签名证书吗?

更多信息:

在除我自己以外的所有机器上,java 阻止应用程序,说它使用自签名证书。

我什至不明白为什么它可以在我的机器上运行。我在 java 控制面板 (1.8.0_45-b15) 中查看了受信任的证书根列表,但我在那里找不到 "COMODO RSA Certification Authority"。

我确实在 "Trusted Root Certification Authorities" 下的 Windows MMC 证书管理单元中看到了该证书。但至少在其他 3 台机器上它不存在。

更新:这是一个 JRE 版本错误。 Comodo's new CA certs were added to the default keystore in Java 8u51.

另一个问题的答案,虽然有点不合时宜,但在这里似乎很切题:

You can tell if a CA's certs will work for Java code-signing by examining the Java cacerts file, which lists all the CAs known to Java. If their cert is in this file, then Java will not complain about the signed code. If it isn't, then it will warn the users. For example:

root@girflet:~# keytool -list -keystore /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/security/cacerts | grep comodo

Enter keystore password: changeit

comodoaaaca, 02-May-2006, trustedCertEntry,

Note that I had to enter the default keystore password, changeit. This command should work on Windows as well, although you'll have to change the path to the cacerts file and you won't have grep. Use more instead and page through until you find or don't find what you're looking for.

As of today, Comodo is in the cacerts file, and startssl aren't. So a startssl cert wouldn't be much good for Java code.

Source:

我可以给你一个有条件的答案。 在其中一台不喜欢您的证书的计算机上,转到 http://jonathancrosmer.com/software/invadeearth/ 然后点击入侵地球。
该程序使用 Comodo 证书。我是针对 Java 7 构建的,但是如果您的计算机只有 Java 8 运行时,它应该仍然可以工作。 1. 如果您收到相同的警告,您就知道这是一个 Java 8 问题。 2. 否则,您知道您的证书有问题。 无论哪种方式,您都可能希望从您的证书颁发者那里获得退款,因为他们宣传他们的证书受到 Java.

的信任。

我终于解决了 - 这是故事:

当我购买证书时,我必须通过导航到我通过电子邮件收到的网站地址来收集它。在那里,证书自动安装到我的浏览器 (Firefox) 的信任库中。

然后我从 Firefox 导出它(选项 - 高级 - 查看证书 - 你的证书 - 备份按钮)。

当时我没有意识到 Firefox 与 Java 和 Windows 不同,它具有 "COMODO RSA Certification Authority" 作为内置令牌:

当时我还不知道的是 Firefox 证书导出似乎只包括到第一个受信任机构 的证书链,在这种情况下 "COMODO RSA Certification Authority".

从这个 COMODO support site 我了解到链条实际上应该上升一个,一直到 "AddTrust External CA Root":

这听起来更有希望,因为 AddTrust 证书实际上包含在 Oracle 的 java 8 cacerts truststore 中,它负责在 [=81] 期间验证 jar =] webstart.

接下来我做的是将从 Firefox 获得的 *.p12 文件导入 windows 证书管理器(开始 - certmgr.msc),因为出于某种原因我认为这是方式将 *.p12 转换为 *.pfx(尽管现在我知道这两个扩展名都用于相同的 pkcs12 密钥库格式)。无论如何,在导入过程中弹出了这个问题:

在这里我犯了一个严重的错误:我点击了是。这导致 "COMODO RSA Certification Authority" 作为 "Trusted Root Certificate" 安装在 Windows 信任库中(顺便说一句,只有在我重新启动 certmgr.msc 后才可见):

我的代码签名证书已安装在 "Personal/Certificates" 中。我从那里导出它(操作 - 所有任务 - 导出...),并标记为 "Include all certificates in the certification path if possible".

现在发生了与我从 Firefox 导出时完全相同的事情。由于 Windows 现在已将 "COMODO RSA Certification Authority" 安装为受信任的根证书,因此它只包含到此证书的链。这是我导出后得到的:

现在是我偶然发现的天才之举:我从 Windows 认证管理器中删除了 "COMODO RSA Certification Authority"。现在,当我双击我的代码签名证书时,显示的链突然看起来不一样了:

我承认当我看到这个时我的肾上腺素激增。我再次导出(与之前完全相同的设置)。

事实上,在我用这个导出的证书签署我的应用程序后,java webstart 接受了它: