[英]Convert public cert, private key, and certificate chain .pem files to jks keystore
I have 3 separate .pem files:我有 3 个单独的 .pem 文件:
publicCert.pem
privateKey.pem
CertificateChain.pem
I want to put these into a new java keystore.我想将这些放入一个新的java 密钥库中。
I have seen this question asked and answered before, but with only 1 or 2 .pem files, not 3, and not specifically for a new jks.我之前看过这个问题的提问和回答,但只有 1 或 2 个 .pem 文件,而不是 3 个,也不是专门针对新jks 的。
Additionally the other web servers run on IIS, and are using SSL with a wildcard domain.此外,其他 Web 服务器在 IIS 上运行,并使用带有通配符域的 SSL。 example: *domain.com
例如:*domain.com
Can I create a jks for a wildcard domain?我可以为通配符域创建 jks 吗? Looks like that may be tricky?
看起来这可能很棘手?
Commands appreciated!命令赞赏!
Build a PKCS12 file, then use Java's Keytool to convert to a Java keystore. 构建一个PKCS12文件,然后使用Java的Keytool转换为Java密钥库。
openssl pkcs12 -export -chain -inkey privateKey.pem -CAfile CertificateChain.pem -in publicCert.pem -out myp12file.p12
keytool -importkeystore -destkeystore mykeystore.jks -srckeystore myp12file.p12 -srcstoretype pkcs12 -destalias mykey -srcalias 1
It will ask you for passwords, too. 它还会要求您输入密码。
I have just one file: name.jks.我只有一个文件:name.jks。 I would like to have cafile.pem, certfile.pem and keyfile.pem.
我想要 cafile.pem、certfile.pem 和 keyfile.pem。 How can I get it?
我怎么才能得到它?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.