如何使用自签名证书在我签名的jar文件中设置发布者名称?

时间:2022-10-02 23:04:35

I've compiled my applet, created a jar file, generated a keystore db with keytool, signed the jar with jarsigner, and exported the public key cert with keytool.

我编译了我的applet,创建了一个jar文件,用keytool生成了一个密钥库db,用jarsigner签署了jar,并用keytool导出了公钥证书。

Now when I run my applet in the browser it does work, after prompting me if I'm sure I want it to run.

现在,当我在浏览器中运行我的小程序时它确实有效,在提示我之后我是否确定要运行它。

The problem is it says "Publisher: UNKNOWN" in the box. Is there anyway I can set that to my alias, since I coded the applet?

问题是它在框中说“发布者:未知”。无论如何我可以将其设置为我的别名,因为我编写了applet?

2 个解决方案

#1


6  

A 'self signed' certificate is not worth the bits it is written on. If you can make a certificate that claims it is you, I can just as easily forge one.

“自签名”证书不值得写入。如果你可以制作一份声称是你的证书,我就可以轻松打造一个。

That is why the JRE lists the publisher as 'unknown'. It does not matter who they claim to be, it is ignored unless the certificate has been verified by a trusted authority.

这就是JRE将出版商列为“未知”的原因。无论他们声称自己是谁,除非证书已由受信任的机构验证,否则它将被忽略。

#2


2  

Make sure you have used the following steps

确保您已使用以下步骤

keytool -keystore mystore -genkey -alias my

keytool -keystore mystore -selfcert -alias my

jarsigner -keystore mystore myapplet.jar my

#1


6  

A 'self signed' certificate is not worth the bits it is written on. If you can make a certificate that claims it is you, I can just as easily forge one.

“自签名”证书不值得写入。如果你可以制作一份声称是你的证书,我就可以轻松打造一个。

That is why the JRE lists the publisher as 'unknown'. It does not matter who they claim to be, it is ignored unless the certificate has been verified by a trusted authority.

这就是JRE将出版商列为“未知”的原因。无论他们声称自己是谁,除非证书已由受信任的机构验证,否则它将被忽略。

#2


2  

Make sure you have used the following steps

确保您已使用以下步骤

keytool -keystore mystore -genkey -alias my

keytool -keystore mystore -selfcert -alias my

jarsigner -keystore mystore myapplet.jar my