cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Mutual SSL client with custom SSL Socket Factory
Date Thu, 09 Jan 2014 16:01:14 GMT

On Jan 9, 2014, at 8:21 AM, sumit_chauhan <sumit_chauhan@uhc.com> wrote:

> I am using CXF-2.4.6. I wish to communicate with a Mutual SSL enabled web
> service. I wanted to programatically set the client certificate alias, which
> gets passed on to server. I tried writing a custom SSLSocketFactory with
> custom key manager( which provides the alias) and registered it as follows:
> 
> 
> bindingProvider.getRequestContext().put("com.sun.xml.internal.ws.transport.https.client.SSLSocketFactory",
> socketFactory);

That property would only be for the in-jdk jaxws implementation.   It is specific to that
and wouldn’t work with CXF or Metro or anything else.

> However, *chooseClientAlias *method of custom key manager never gets called
> and no certificate gets passed to server, which results in handshake
> failure.
> Please help out with this issue.


Check the page on configuring tls:
http://cxf.apache.org/docs/tls-configuration.html

There is a setting for the actual SSLSocketFactory to use, but usually that is not needed
as there are settings for almost everything else you may need.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Mime
View raw message