我从 GeoTrust 为我客户的网络应用程序购买了 SSL 证书。(我使用的是 Tomcat 6)。我从 GeoTrust 获得了以下文件。
- CACertificate-INTERMEDIATE-1.cer
- CACertificate-ROOT-2.cer
- 服务器证书.cer
- PKCS7.p7b
- 私钥.txt
- mycert.jks
我没有创建私钥或 CSR。该过程由我购买 SSL 证书的公司完成。现在,当我按照链接 (http://www.geotrust.eu/en/support/manuals/tomcat/tomcat+webserver/install+certificate/) 中提到的步骤操作时,我无法配置 SSL。我有以下疑问
- 上面链接中的步骤提到了“.crt”但是我有“.cer”文件。一样吗?
- 以下是我的 .jks 文件的初始行,之前 遵循上述链接中的步骤。够了吗?
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: www.myclientname.com
Creation date: 2 Feb, 2017
Entry type: PrivateKeyEntry
Certificate chain length: 3
- 执行上述链接中的步骤后,Keytool 的最后一条消息应该是“证书回复已安装在 keystore 中”。但是我收到消息“证书已成功添加到 keystore ”。我认为它没有添加到我的证书中?
我已经使用自签名(不受信任的)证书进行了测试并且它工作正常但是当我尝试在 server.xml 中配置以下行时它不会工作。
<Connector port="443" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="my_keystore_with_full_path" keypass="my_keystore_password" />
最佳答案
I HAD NOT CREATED PRIVATE KEY OR CSR. That process was completed by the company from which I had purchased SSL certificate.
你自己的证据反驳了它。根据定义,第三方不能为您做这件事。否则你的私钥就不会是私密的。
- Following is initial lines of my .jks file BEFORE following Steps from above link. Is it sufficient?
它不仅足够,而且完全反驳了您没有生成私钥的断言。你做到了,就在这里。您还可以生成 CSR。
您现在要做的就是使用相同的别名导入签名证书。
- After following steps from above link, Last message of Keytool should be "Certificate reply was installed in keystore". BUT I am getting message as "Certificate Added in keystore successfully". I think it’s not added into my certificate?
正确。链接中的最终说明不正确。导入实际签署的证书时,您应该不使用-trustcacerts
选项。您应该只将它用于根证书和中间证书。您应该向供应商投诉该错误。
关于tomcat - 如何在 Tomcat 6 上配置 SSL 证书?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42217993/