Daniel Schielzeth created CXF-8104:
--------------------------------------
Summary: Can't assign keystore and truststore before connecting
Key: CXF-8104
URL: https://issues.apache.org/jira/browse/CXF-8104
Project: CXF
Issue Type: Bug
Affects Versions: 2.3.11
Reporter: Daniel Schielzeth
I want to use a SOAP Provider with my java client. The Provider requires a
Certificate (keystore and truststore). We have tried many ways to make sure the
certificate is used for the client but it doesn't seem to work. I guess, the
certificate is set too late. The best we could come up with is
{code:java}
KeyStore keyStore = KeyStore.getInstance(cert.getKeystore_type());
keyStore.load(new FileInputStream(cert.getKeystore_file()),
cert.getKeystore_password().toCharArray());
KeyStore trustStore = KeyStore.getInstance(cert.getTruststore_type());
trustStore.load(new FileInputStream(cert.getTruststore_file()),
cert.getTruststore_password().toCharArray());
SSLContext context = initSecurityContext(keyStore, trustStore,
cert.getKeystore_password());
SOAPService client = (ListBuyerRequestsReadServicePortType)
ClientBuilder.newBuilder().register(SOAPService.class).sslContext(context).build();
{code}
We get a _javax.net.ssl.SSLHandshakeException: Received fatal alert:
handshake_failure_ when assigning the client in the last line.
Do you know how to do it?
--
This message was sent by Atlassian Jira
(v8.3.2#803003)