Andrea Cosentino created CAMEL-23505:
----------------------------------------

             Summary: camel-splunk-hec: align hostname verification with system 
default in SplunkHECProducer
                 Key: CAMEL-23505
                 URL: https://issues.apache.org/jira/browse/CAMEL-23505
             Project: Camel
          Issue Type: Bug
          Components: camel-splunk-hec
            Reporter: Andrea Cosentino


In {{SplunkHECProducer.doStart()}} (else-branch, around lines 78–85), the 
{{SSLConnectionSocketFactory}} is built with {{NoopHostnameVerifier.INSTANCE}}, 
which is inconsistent with {{skipTlsVerify=false}} (the default).

{code:java}
SSLConnectionSocketFactory sslsf
        = new SSLConnectionSocketFactory(endpoint.provideSSLContext(),
                                         NoopHostnameVerifier.INSTANCE);
{code}

The verifier should fall back to the system default in this branch:

{code:java}
SSLConnectionSocketFactory sslsf
        = new SSLConnectionSocketFactory(endpoint.provideSSLContext());
{code}

Optionally, expose an {{x509HostnameVerifier}} {{@UriParam}} on 
{{SplunkHECConfiguration}} so users can plug in a custom verifier (mirroring 
camel-http).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to