RKo*_*dla 4 ssl ssl-certificate
我正在尝试为 Boomi Web 服务启用 SSL。我已按照其文档中的说明生成 CSR 并将其发送给 CA 进行签名。我已收到 .pem 格式的签名证书。我查看了该文件的内容,它不包含有关任何私钥的任何信息。
\n\n这些是 Boomi 文档中的步骤。
\n\n1) Replace the keystore path, KEYSTORENAME and \xe2\x80\x93dname parameters in this command with your information (this \xe2\x80\x93dname \xe2\x80\x9c\xe2\x80\xa6.\xe2\x80\x9d option can be omitted if the trusted root authority requests this information when submitting the CSR) and run the following command to generate the key:\n\nkeytool -genkey -dname "CN=HOSTNAME, OU=ORGUNIT, O=ORG, L=LOCATION, S=STATE, C=COUNTRY" -alias Boomi -keyalg RSA -keystore c:\\Certificates\\Boomi\\KEYSTORENAME -keysize 2048\n\n2) Replace the KEYSTORENAME in this command and run the following command to generate the CSR:\n\nkeytool -certreq -keyalg RSA -alias Boomi -file c:\\Certificates\\Boomi\\KEYSTORENAME.csr -keystore c:\\Certificates\\Boomi\\KEYSTORENAME\n\n3) Submit the CSR to the Trusted Root Authority (for example, Verisign), and request/download the returned certificate in PKCS7 format. This will have a public, G3 intermediate, and G5 intermediate certificate all in one certificate. Java must be 1.6 or newer.\n\n4) Replace the certificate file path\\name and keystore path\\name in this command and run the following command to import the PKCS7 certificate:\n\nkeytool -import -alias Boomi -trustcacerts -file c:\\Certificates\\Boomi\\NEWCERTNAME.p7b -keystore c:\\Certificates\\Boomi\\KEYSTORENAME\n\n5) Replace the new and destination keystore paths/names and passwords (if different from changeit) in this command and run the following command to convert to .p12 format for import into Boomi:\n\nkeytool -importkeystore -srckeystore c:\\Certificates\\Boomi\\KEYSTORE -destkeystore c:\\Certificates\\Boomi\\KEYSTORENAME.p12 -srcstoretype JKS -deststoretype PKCS12 -srcstorepass changeit -deststorepass changeit -srcalias Boomi -destalias Boomi -srckeypass changeit -destkeypass changeit -noprompt\nRun Code Online (Sandbox Code Playgroud)\n\n我被困在第 4 步,因为我没有 .p7b 格式的签名证书。我搜索了有关如何将 .pem 文件转换为 .p7b 文件的任何信息,所有这些信息都提到 .pem 文件将包含密钥信息以及证书信息。但由于我拥有的 .pem 文件没有关键信息,我应该如何将 .pem 转换为 .p7b 并最终获得 .p12 证书。
\n\n另外,如果可能的话,您能解释一下这些格式的含义吗?
\n小智 5
首先,查看此ServerFault 答案以获取有关密钥和密钥格式的信息。
其次,为了解决您的问题,.pem 文件可能包含也可能不包含私钥信息。对于签名证书(向 CA 提交 CSR 后签名),它通常不包含私钥。根据您的说明,私钥已经存在于密钥库中。我相信指令 4 中的命令会将信任链 (.p7b) 导入密钥库,因此您将在同一个 [受保护] 文件中拥有公钥、私钥和信任链。
如果您没有 .p7b 格式的文件,您可以请求 CA 将其以 .p7b 格式发送给您。
除此之外,我要尝试的第一件事就是更改命令以包含 .pem 文件而不是 .p7b 文件。 keytool非常聪明,我认为它会弄清楚导入 .pem 而不是 .p7b 需要做什么。
如果由于某种原因这不起作用,您还可以做更多事情,但事情开始变得更加复杂。我将从这个链接开始。祝你好运!
| 归档时间: |
|
| 查看次数: |
9258 次 |
| 最近记录: |