可以从.crt和.key文件创建.jks [英] Creating a .jks from a .crt and .key file, is that possible
问题描述
我从权威机构请求了SSL证书.
I requested a SSL certificate from an authority.
首先,我在计算机上创建了.csr和.key文件并将其保存.我发送了.csr并取回了.crt文件和我安装在服务器上的其他文件.
First, I created a .csr and a .key file on my computer and saved those. I sent the .csr and got back a .crt file and other files that I installed on my server.
对于具有SSL连接的Apache服务器,一切正常.但是,我希望能够对我在系统的另一个端口(使用JIRA)上运行的Tomcat服务器使用相同的证书.安装程序需要一个.jks文件.是否可以从我拥有的文件中生成该文件?
All works fine for my Apache server with an SSL connection. However, I would like to be able to use the same certificate for a Tomcat server that I also have running on the system on a different port (Using JIRA). The setup needs a .jks file. Is it possible to generate that from the files that I have?
这似乎可行,但是我的CLASSPATH中没有该实用程序,或者找不到它.
This seems like it might work, but I don't have that utility in my CLASSPATH or cannot find it.
推荐答案
您可以从这些文件转换PFX:
You can convert a PFX from those files:
openssl pkcs12 -export -out domain.name.pfx -inkey domain.name.key -in domain.name.crt
然后按照以下指南从PFX导出jks:
Then export the jks from the PFX by following this guide:
https://blogs.oracle.com/blogbypuneeth/entry/steps_to_create_a_jks1
这篇关于可以从.crt和.key文件创建.jks的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!