仅存储私钥在密钥库中,并使用Java读取它
我想将一个私钥存储在Java密钥库中。我的文件看起来像
-----BEGIN PRIVATE KEY-----
actual key
-----END PRIVATE KEY-----
我通过谷歌搜索获得的所有示例都涉及存储证书。我没有证书,也不需要它。
如何通过命令行在Linux计算机上仅存储一个私钥? (Java中似乎有一些示例,但是Sysadmin将在将部署应用程序的所有机器中添加它,因此需要命令行方法)
我需要从Java应用程序中读取私钥,我希望类似的东西
final Key key = (PrivateKey) keystore.getKey(alias, password.toCharArray());
会起作用,但无法对其进行测试,因为我首先无法存储私钥。
我需要从我的Java应用程序中读取该键
I want to store a private key in a java keystore. My file looks like
-----BEGIN PRIVATE KEY-----
actual key
-----END PRIVATE KEY-----
All examples I get by googling involve storing a certificate as well. I do not have a certificate and I do not need it.
How do I store only a private key on a linux machine via the command line? (There seem to be some examples in java, but a sysadmin would be doing adding it in all machines where the application will be deployed, so a command line method is needed)
I need to read the private key from a java application, I hope that something similar to
final Key key = (PrivateKey) keystore.getKey(alias, password.toCharArray());
will work, but haven't been able to test it as I haven't been able to store a private key in the first place.
I would need to read that key from my java application
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论