David David - 1 year ago 67
Java Question

Why client cert is not sent during SSL connection? CXF 2.7.9


My application is deployed in jboss 5, communicates with a Web service server which requires MASSL. (2-way SSL)


By looking at the log of SSL connection, client cert is not sent even it has been loaded at the beginning.

Log details as below, client cert is supposed to be sent after server hello is done.

[EDIT] Added more details based on reply

  1. added CertificateRequest in log

  2. Cient certificate actually matches above request - (a) algorithm is RSA, (b) signed by one the CAs speficied in the request


2016-11-25 09:32:38,434 INFO [STDOUT] (http- keyStore is : /XX/XX/my.jks
2016-11-25 09:32:38,434 INFO [STDOUT] (http- keyStore type is : jks
2016-11-25 09:32:38,434 INFO [STDOUT] (http- keyStore provider is :
2016-11-25 09:32:38,434 INFO [STDOUT] (http- init keystore
2016-11-25 09:32:38,440 INFO [STDOUT] (http- init keymanager of type SunX509
2016-11-25 12:00:04,420 INFO [STDOUT] (http- ***
2016-11-25 12:00:04,421 INFO [STDOUT] (http- found key for : mykey
2016-11-25 12:00:04,432 INFO [STDOUT] (http- 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- *** CertificateRequest
2016-11-25 12:00:05,521 INFO [STDOUT] (http- Cert Types:
2016-11-25 12:00:05,521 INFO [STDOUT] (http- RSA
2016-11-25 12:00:05,521 INFO [STDOUT] (http- Cert Authorities:
2016-11-25 12:00:05,521 INFO [STDOUT] (http- <CN=abc AD Object CA1, DC=core, DC=dir, DC=def, DC=com>
2016-11-25 12:00:05,521 INFO [STDOUT] (http- <CN=abc Policy CA1, O=gh Corporation Limited>
2016-11-25 12:00:05,522 INFO [STDOUT] (http- <CN=abc Root CA>

2016-11-25 09:32:39,475 INFO [STDOUT] (http- *** ServerHelloDone
2016-11-25 09:32:39,475 INFO [STDOUT] (http- *** Certificate chain
2016-11-25 09:32:39,475 INFO [STDOUT] (http- ***
2016-11-25 09:32:39,482 INFO [STDOUT] (http- *** ClientKeyExchange, RSA PreMasterSecret, TLSv1
2016-11-25 09:32:39,482 INFO [STDOUT] (http- http-, WRITE: TLSv1 Handshake, length = 269
2016-11-25 09:32:39,482 INFO [STDOUT] (http- SESSION KEYGEN:
2016-11-25 09:32:39,483 INFO [STDOUT] (http- PreMaster Secret:


Did I missing something here? 

Answer Source

For anyone who is having same issue while using CXF (2.7.9), this is a doggy issue that CXF introduces.

CXF doesn't pick up keystore configured by VM argument "-Djavax.net.ssl.keyStore", but has its own solution. see http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-ConfiguringSSLSupport

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download