关于密钥库的虚拟问题?

发布于 2024-08-28 00:29:39 字数 380 浏览 6 评论 0原文

我是 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 技术交流群。

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

发布评论

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

评论(2

人疚 2024-09-04 00:29:39

您似乎跳过了第一步,即创建密钥库。按照此处的说明进行操作,您应该首先运行此命令:

keytool -genkey -dname "CN=myhost.mycorp.com" -keystore myhost-keystore.dat -validity 3650 -alias myhost \
-keyalg DSA -storetype JKS -keypass jonpassword -storepass jonpassword

这将在当前目录中创建 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:

keytool -genkey -dname "CN=myhost.mycorp.com" -keystore myhost-keystore.dat -validity 3650 -alias myhost \
-keyalg DSA -storetype JKS -keypass jonpassword -storepass jonpassword

That will create the myhost-keystore.dat file in the current directory. After that, you should be able run the keytool -export ... command, which will create the myhost-cer file, again in the current directory. And finally, the keytool -import ... command will import that certificate into a new keystore file named truststore.dat in the current directory.

Note that JKS is a keystore type, not the name of a file.

一身仙ぐ女味 2024-09-04 00:29:39

cacerts 默认 jks 位于

${YOUR_JRE_HOME}/lib/security/

但对于 JBoss 来说可能还不够。

服务器实例下可能有一些配置位置

cacerts default jks is at

${YOUR_JRE_HOME}/lib/security/

But for JBoss it may not be enough.

There may be some config location under server instance

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