【发布时间】:2014-08-16 13:33:24
【问题描述】:
我找到了介绍生成密钥步骤的教程。 它讲述了以下步骤:
keytool -genkey -alias clientprivate -keystore client.private -storetype JKS -keyalg rsa \
-dname "CN=Your Name, OU=Your Organizational Unit, O=Your Organization, L=Your City, \
S=Your State, C=Your Country" -storepass clientpw -keypass clientpw
keytool -genkey -alias serverprivate -keystore server.private -storetype JKS -keyalg rsa \
-dname "CN=Your Name, OU=Your Organizational Unit, O=Your Organization, L=Your City, \
S=Your State, C=Your Country" -storepass serverpw -keypass serverpw
keytool -export -alias clientprivate -keystore client.private \
-file temp.key -storepass clientpw
keytool -import -noprompt -alias clientpublic -keystore client.public \
-file temp.key -storepass public
keytool -export -alias serverprivate -keystore server.private \
-file temp.key -storepass serverpw
keytool -import -noprompt -alias serverpublic -keystore server.public \
-file temp.key -storepass public
但我很困惑 .jks 文件在哪里?为什么我们使用 temp.key? 你可以回答我的问题,我将不胜感激......
【问题讨论】:
-
这个问题似乎离题了,因为它与编程无关。也许Super User 会是一个更好的提问地点。
-
@jww 这是关于keytool的,它是JDK的一部分。这里有数百个类似的问题。
-
@EJP - 其中一些可能也离题了。社区有时在自我监管和执行自己的政策方面做得很差。
标签: java ssl ssl-certificate jsse truststore