【发布时间】:2020-04-23 21:25:27
【问题描述】:
我从 Comodo 为我的域购买了 SSL 证书。 Comodo 提供给我的文件是:
- SSL_PrivateKEY_www_my-domain_com.txt
- SSL_CSR_www_my-domain_com.txt
- AddTrustExternalCARoot.crt
- USERTrustRSAAddTrustCA.crt
- SectigoRSADomainValidationSecureServerCA.crt
- www_my-domain_com.crt
经过研究,我发现了这个Steps to create a .jks keystore using .key and .crt files...,我使用 3,4 和 5 crt 文件并创建 cert.pem,然后我使用 1 crt 创建 key.pem。之后,我正在按照指南所说的创建 jks。接下来,我在keystore中导入6 crt文件,像这样:
keytool -import -alias mykey -file www_my-domain_com.crt -keystore www_my-domain_com.jks
之后,我使用 keystore explorer 将我的密钥库转换为 PKCS12。最后我在我的服务器上上传文件,这是我的 tomcat 8,连接器:
<Connector port="9443" maxHttpHeaderSize="8192" maxThreads="100"
minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
protocol="org.apache.coyote.http11.Http11Protocol"
SSLEnabled="true" clientAuth="false"
keyAlias="server" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.1,TLSv1"
keystoreFile="/home/test/ssls/www_my-domain_com.jks"
keystorePass="password" />
重新启动我的 tomcat,然后我在 firefox 上遇到的错误
错误代码:SEC_ERROR_BAD_SIGNATURE
我还使用 KeyStore Explorer 来检查 ssl 和显示的错误:
javax.net.ssl.SSLKeyException: Invalid signature on ECDH server key exchange message
at sun.security.ssl.HandshakeMessage$ECDH_ServerKeyExchange.<init>(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
at org.kse.utilities.ssl.SslUtils.readSSLConnectionInfos(SslUtils.java:116)
at org.kse.gui.dialogs.DExaminingSsl$ExamineSsl.run(DExaminingSsl.java:207)
at java.lang.Thread.run(Unknown Source)
【问题讨论】:
标签: ssl tomcat installation ssl-certificate tomcat8