在Windows JRE中导入StartCom CA证书 [英] Import StartCom CA certificates in Windows JRE

查看:355
本文介绍了在Windows JRE中导入StartCom CA证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java应用程序访问使用StartCom SSL证书的服务。为了这个工作,我需要添加StartCom CA证书到Java的信任库,因为他们默认不在那里。我使用这些命令在linux上成功执行了这些操作。

I have a Java application accessing a service that uses a StartCom SSL certificate. For this to work, I need to add the StartCom CA certs to Java's truststore, because they're not in there by default yet. I've succesfully done that on linux using these commands

sudo keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -alias startcom.ca -file ca.crt
sudo keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -alias startcom.ca.sub.class1 -file sub.class1.server.ca.crt
sudo keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -alias startcom.ca.sub.class2 -file sub.class2.server.ca.crt
sudo keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -alias startcom.ca.sub.class3 -file sub.class3.server.ca.crt
sudo keytool -import -trustcacerts -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit -noprompt -alias startcom.ca.sub.class4 -file sub.class4.server.ca.crt

(来自

(From this script)

相同的命令(适当修改)在Windows上不起作用。 。我得到:

The same command (adapted appropriately) doesn't work on Windows however. I get:

keytool error: java.lang.RuntimeException: Usage error, trustcacerts is not a legal command

如何使它工作?

推荐答案

这是一个简单的拼写错误。在转换命令我忘了破折号trustcacerts之前。 :(

It was a simple typo. In converting the command I forgot a dash before "trustcacerts". :(

这篇关于在Windows JRE中导入StartCom CA证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆