我的应用程序部署在jboss 5中,与需要MASSL的Web服务服务器通信。 (双向SSL)
通过查看SSL连接的日志,即使已经在开始时加载了客户端证书,也不会发送客户端证书。
记录详细信息如下,客户端证书应该在服务器问候完成后发送。
[编辑] 根据回复添加了更多详情
在日志中添加了 CertificateRequest
Cient证书实际匹配上述请求 - (a)算法是RSA,(b)由请求中明确的CA签名
日志:
2016-11-25 09:32:38,434 INFO [STDOUT] (http-0.0.0.0-8080-4) keyStore is : /XX/XX/my.jks
2016-11-25 09:32:38,434 INFO [STDOUT] (http-0.0.0.0-8080-4) keyStore type is : jks
2016-11-25 09:32:38,434 INFO [STDOUT] (http-0.0.0.0-8080-4) keyStore provider is :
2016-11-25 09:32:38,434 INFO [STDOUT] (http-0.0.0.0-8080-4) init keystore
2016-11-25 09:32:38,440 INFO [STDOUT] (http-0.0.0.0-8080-4) init keymanager of type SunX509
2016-11-25 12:00:04,420 INFO [STDOUT] (http-0.0.0.0-8080-4) ***
2016-11-25 12:00:04,421 INFO [STDOUT] (http-0.0.0.0-8080-4) found key for : mykey
2016-11-25 12:00:04,432 INFO [STDOUT] (http-0.0.0.0-8080-4) chain [0] = [
[
Version: V3
Subject: CN=xx.xxx.xxx.com, OU=xxxxxxxx, O=xxxx, L=xxxx, ST=xxx, C=xx
Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
Issuer: CN=abc AD Object CA1, DC=core, DC=dir, DC=def, DC=com
...
2016-11-25 12:00:05,520 INFO [STDOUT] (http-0.0.0.0-8080-4) *** CertificateRequest
2016-11-25 12:00:05,521 INFO [STDOUT] (http-0.0.0.0-8080-4) Cert Types:
2016-11-25 12:00:05,521 INFO [STDOUT] (http-0.0.0.0-8080-4) RSA
2016-11-25 12:00:05,521 INFO [STDOUT] (http-0.0.0.0-8080-4) Cert Authorities:
2016-11-25 12:00:05,521 INFO [STDOUT] (http-0.0.0.0-8080-4) <CN=abc AD Object CA1, DC=core, DC=dir, DC=def, DC=com>
2016-11-25 12:00:05,521 INFO [STDOUT] (http-0.0.0.0-8080-4) <CN=abc Policy CA1, O=gh Corporation Limited>
2016-11-25 12:00:05,522 INFO [STDOUT] (http-0.0.0.0-8080-4) <CN=abc Root CA>
2016-11-25 09:32:39,475 INFO [STDOUT] (http-0.0.0.0-8080-4) *** ServerHelloDone
2016-11-25 09:32:39,475 INFO [STDOUT] (http-0.0.0.0-8080-4) *** Certificate chain
2016-11-25 09:32:39,475 INFO [STDOUT] (http-0.0.0.0-8080-4) ***
2016-11-25 09:32:39,482 INFO [STDOUT] (http-0.0.0.0-8080-4) *** ClientKeyExchange, RSA PreMasterSecret, TLSv1
2016-11-25 09:32:39,482 INFO [STDOUT] (http-0.0.0.0-8080-4) http-0.0.0.0-8080-4, WRITE: TLSv1 Handshake, length = 269
2016-11-25 09:32:39,482 INFO [STDOUT] (http-0.0.0.0-8080-4) SESSION KEYGEN:
2016-11-25 09:32:39,483 INFO [STDOUT] (http-0.0.0.0-8080-4) PreMaster Secret:
我在这里遗失了什么吗?
答案 0 :(得分:1)
客户端证书应该在服务器问候完成后发送。
不,不是。它应该只在以下情况下发送:
CertificateRequest
消息您的问题中没有证据表明所有这些条件都适用。
答案 1 :(得分:0)
对于在使用 CXF(2.7.9)时遇到相同问题的任何人,这是CXF引入的狗狗问题。
CXF不会选择由VM参数&#34; -Djavax.net.ssl.keyStore&#34;配置的密钥库,但有自己的解决方案。见http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-ConfiguringSSLSupport