我正在尝试连接到安全的Web服务.
即使我的密钥库和信任库已正确设置,我也会收到握手失败.
经过几天的挫折,无休止的谷歌搜索并询问周围的每个人我发现唯一的问题是java选择不在握手期间将客户端证书发送到服务器.
特别:
我的问题:
我确实为此设置了一个肮脏的解决方法,但我对此并不高兴所以如果有人能为我澄清这个,我会很高兴.
我在Tomcat服务器上安装SSL,并遵循发行人https://knowledge.rapidssl.com/support/ssl-certificate-support/index?page=content&actp=CROSSLINK&id=SO16181的这些说明,并声明:
Verify the following information:
The SSL certificate is imported into the alias with the "Entry Type" of
PrivateKeyEntry or KeyEntry. If not, please import the certificate into
the Private Key alias.
Run Code Online (Sandbox Code Playgroud)
当我导入证书(tomcat)时我正在使用:
keytool -import -trustcacerts -alias your_alias_name -keystore your_keystore_filename
-file your_certificate_filename
Run Code Online (Sandbox Code Playgroud)
但是当我这样做时它导入为trustCertEntry
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 3 entries
primaryca, Jul 26, 2014, trustedCertEntry,
Certificate fingerprint (SHA1): <snip>
tomcat, Jul 26, 2014, trustedCertEntry,
Certificate fingerprint (SHA1): <snip>
secondaryca, Jul 26, 2014, trustedCertEntry,
Certificate …Run Code Online (Sandbox Code Playgroud)