You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Fernando Soares Carnevale Ito (Jira)" <ji...@apache.org> on 2022/03/09 16:26:00 UTC

[jira] [Created] (CXF-8674) Custom SSLContext using async http-client5 does not work

Fernando Soares Carnevale Ito created CXF-8674:
--------------------------------------------------

             Summary: Custom SSLContext using async http-client5 does not work
                 Key: CXF-8674
                 URL: https://issues.apache.org/jira/browse/CXF-8674
             Project: CXF
          Issue Type: Bug
          Components: Transports
    Affects Versions: 3.5.0, 3.4.6
            Reporter: Fernando Soares Carnevale Ito


AsyncHTTPConduit configures httpclient5 tlsstrategy [here|https://github.com/apache/cxf/blob/7b144c6ee38c3883ec031ad0cc32d122824b42b5/rt/transports/http-hc5/src/main/java/org/apache/cxf/transport/http/asyncclient/hc5/AsyncHTTPConduit.java#L541]

however this configuration is actually never used. Instead, the http-client5 is always built using the system default TlsStrategy [here|https://github.com/apache/cxf/blob/7b144c6ee38c3883ec031ad0cc32d122824b42b5/rt/transports/http-hc5/src/main/java/org/apache/cxf/transport/http/asyncclient/hc5/AsyncHTTPConduitFactory.java#L303]

The result is that custom SSLContext configured in the httpconduit is not honored.

The current workaround is to keep using cxf-rt-transports-http-hc, or force using the sync httpclient.

I did a quick test propagating the RegistryBuilder<TlsStrategy> built at AsyncHTTPConduit up until the httpclient is built and the custom SSLContext started being used.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)