on-internet
← Community

Set custom SSL context vs. SSLSocketFactory

Stack Overflow ·

I tried Apache CXF for a SOAP client with special TLS/SSL requirements (certs, trusts, crypto, ...). I generate an SSL context in method getSslCtx. This context works - I can successfully use it outside of CXF, e.g. HttpClient. Now I tried it for CXF: if I set it with setSSLContext it does not work. Get SSL errors like no SSL context set at all: SSLException - TlsFatalAlert - certificate unknown (46)... If I set it by setSSLSocketFactory it works without problems. Why is that? I would expect both ways are OK. MyService service = new MyService (); MyServicePortType port = service.getMyServicePo

Comments

Sign in or sign up to comment and upvote.

No comments yet.