java keytool可以导出CSR但不能导入
我读了
http://download.oracle.com/javase/6/docs/ technotes/tools/solaris/keytool.html
它说我们可以导出 CSR 文件,但没有导入功能。
据我所知,当我们创建 CSR 文件时,我们会将其传递给 CA, CA 生成与我们的 CSR 相匹配的证书,然后我们再次将其导入回来。
由于 CSR 来自密钥库,因此证书将与密钥库匹配。 进口没有问题。
不过,这又如何呢。
- 创建密钥库
- 基于密钥库创建 CSR
- 将 CSR 发送到 CA
- 从 CA 获取证书
- 不知何故丢失了密钥库
- 生成新的密钥库
- 导入 证书
- 无法导入,因为此密钥库具有不同的 CSR
- 尝试弄清楚如何创建密钥库 匹配的旧 CSR 文件
- 基于与来自 CA 的证书相
I read
http://download.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html
It says that we can export a CSR file, but no import feature.
I understand that when we create a CSR file, we pass it to the CA,
the CA generates the certs to match our CSR and then we import it back again.
Because the CSR is from the keystore, the certs will match the keystore.
No problems with imports.
However, what about this.
- create a keystore
- create a CSR based on the keystore
- send CSR to CA
- got certs from CA
- somehow lost the key store
- generate a new key store
- import the certs
- fail to import because this keystore has a different CSR
- try to figure out how to create a keystore based on the old CSR file that matches the certs from the CA
- stumped
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也遇到过同样的情况。
如果您丢失了密钥存储,这意味着您也丢失了私钥。当然,这个私钥并不是以明文形式存在于 CSR 中(毕竟它是发送给 CA 的!)。当您唯一拥有的就是 CSR 时,就无法恢复它。
CSR 是为一个特定的私钥生成的。如果发生丢失,您唯一能做的就是创建一个新的 CSR(使用新的密钥存储和新的私钥 - 这次不要丢失......)并再支付 200 美元左右让 CA 签名它。 :/
是的,我的老板对我不满意。 :)
您确实应该在某个安全的地方备份密钥存储。
I have been in the same situation.
If you have lost your key store, this means you have also lost the private key. Of course this private key is not in the CSR in plain text (It is sent to the CA after all!). There is no way of restoring it when the only thing you have is the CSR.
The CSR is generated for one specific private key. In case of a loss the only thing you can do is create a new CSR (with the new key store and new private key - don't lose it this time...) and pay another 200 or so bucks for a CA to sign it. :/
Yeah, my boss was not happy with me. :)
You should really make a backup of the key store in some safe place.