关于密钥库的虚拟问题?
我是 java 和 jboss 新手,
我在 Centos5.4 最终机器上尝试了这些命令 在哪里可以找到 .JKS 和 .dat 文件?
keytool -export -keystore myhost-keystore.dat -alias myhost -storetype JKS -storepass jonpassword \
-file myhost-cer
keytool -import -keystore truststore.dat -alias myhost -storetype JKS -file myhost-cert
-noprompt -keypass jonpassword -storepass jonpassword
谢谢
I am new to java and jboss
I tried these commands on my Centos5.4 final machine
where I can find the .JKS and .dat files ?
keytool -export -keystore myhost-keystore.dat -alias myhost -storetype JKS -storepass jonpassword \
-file myhost-cer
keytool -import -keystore truststore.dat -alias myhost -storetype JKS -file myhost-cert
-noprompt -keypass jonpassword -storepass jonpassword
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您似乎跳过了第一步,即创建密钥库。按照此处的说明进行操作,您应该首先运行此命令:
这将在当前目录中创建
myhost-keystore.dat
文件。之后,您应该能够运行keytool -export ...
命令,该命令将再次在当前目录中创建myhost-cer
文件。最后,keytool -import ...
命令将该证书导入到当前目录中名为truststore.dat
的新密钥库文件中。请注意,JKS 是密钥库类型,而不是文件名。
It looks like you've skipped the first step, which is to create the keystore. Following the instructions here, you should first run this command:
That will create the
myhost-keystore.dat
file in the current directory. After that, you should be able run thekeytool -export ...
command, which will create themyhost-cer
file, again in the current directory. And finally, thekeytool -import ...
command will import that certificate into a new keystore file namedtruststore.dat
in the current directory.Note that JKS is a keystore type, not the name of a file.
cacerts 默认 jks 位于
但对于 JBoss 来说可能还不够。
服务器实例下可能有一些配置位置
cacerts default jks is at
But for JBoss it may not be enough.
There may be some config location under server instance