数字证书:如何使用 .cer 文件导入到 .truststore 文件中?
有没有人遇到过必须处理 .truststore 文件的地方? 并知道如何将 .cer 导入 .truststore 文件?
我不确定是否必须使用Java Keytool或Linux命令(例如openssl命令)。
谢谢
Has anyone came across where they have to deal with .truststore file? and knowing how to import .cer into .truststore file?
I am not sure if I have to use Java Keytool or Linux command (such as openssl command).
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Changeit 是默认信任库密码
changeit is the default truststore password
例如,您还可以通过
openssl x509 -out certfile.txt
通过管道传输openssl s_client
输出,而不是使用sed
过滤掉证书:Instead of using
sed
to filter out the certificate, you can also pipe theopenssl s_client
output throughopenssl x509 -out certfile.txt
, for example:将 .cer 文件导入信任存储区的方式与从 Firefox 导出的文件导入 .crt 文件的方式相同。
您不必输入密钥库的别名和密码,只需键入:
最好使用 Java 安装中已有的 cacerts 文件 (jre\lib\security\cacerts),因为它包含安全的“流行”证书。
有关 cer 和 crt 差异的更新(只是为了澄清)
根据 Apache with SSL - How to conversion CER to CRT证书? 和用户@Spawnrider
The way you import a .cer file into the trust store is the same way you'd import a .crt file from say an export from Firefox.
You do not have to put an alias and the password of the keystore, you can just type:
Preferably use the cacerts file that is already in your Java installation (jre\lib\security\cacerts) as it contains secure "popular" certificates.
Update regarding the differences of cer and crt (just to clarify)
According to Apache with SSL - How to convert CER to CRT certificates? and user @Spawnrider