如何让Java“信任”用户证书过期了?

发布于 2024-12-17 08:57:45 字数 198 浏览 5 评论 0原文

我有一个 CA 签名但过期已久的代码签名证书,用于 JWS 部署的 Web 应用程序。

当我启动此应用程序时,我收到一条警告提示,询问我是否信任此发布者。当我同意后,在 Java 控制面板中,我可以在“安全”选项卡中看到证书。

如何以编程方式(从命令行)达到相同的效果? keytool -import 似乎并不能解决问题。

I have a CA-signed, but long expired code signing certificate in use for a JWS-deployed web application.

When I launch this app, I get a warning prompt asking whether I trust this publisher. When I agree, in Java control panel I can see the certificate in Security tab.

How can I achieve the same effect programmatically (from command line)? keytool -import does not seem to do the trick.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

装迷糊 2024-12-24 08:57:45

portecle 程序是一个很棒的小工具,可以完成一些只能使用 API 才能完成的事情。您可以在这里获取它: http://portecle.sourceforge.net/

在 Windows Vista/7 上,您必须运行如果要将证书导入到 cacerts,请以管理员身份运行该程序。我通过以管理员身份运行命令提示符,然后运行 ​​portecle.bat 文件来执行此操作。

cacerts 文件位于此处:
$JAVA_HOME/lib/security/cacerts

按 CTRL-O 打开密钥库文件。 cacerts 的密码是changeit

导入证书后不要忘记保存。

The portecle program is a great little tool for doing things which you can otherwise only do using the API. You can get it here: http://portecle.sourceforge.net/

On Windows Vista/7 you must run the program as administrator if you want to import a certificate into cacerts. I do this by running command prompt as administrator, then running the portecle.bat file.

The cacerts file is located here:
$JAVA_HOME/lib/security/cacerts

Press CTRL-O to open a keystore file. The password for cacerts is changeit

Don't forget to save after you import your certificate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文