You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/10/29 12:05:00 UTC

[jira] [Work logged] (CAMEL-14070) netty4-http - Server Name Indication (SNI) Support

     [ https://issues.apache.org/jira/browse/CAMEL-14070?focusedWorklogId=335491&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-335491 ]

ASF GitHub Bot logged work on CAMEL-14070:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Oct/19 12:04
            Start Date: 29/Oct/19 12:04
    Worklog Time Spent: 10m 
      Work Description: zhfeng commented on pull request #3291: CAMEL-14070 camel-netty-http: update client to support Server Name In…
URL: https://github.com/apache/camel/pull/3291
 
 
   …dication (SNI)
   https://issues.apache.org/jira/browse/CAMEL-14070
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 335491)
    Remaining Estimate: 0h
            Time Spent: 10m

> netty4-http - Server Name Indication (SNI) Support
> --------------------------------------------------
>
>                 Key: CAMEL-14070
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14070
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-netty4-http
>            Reporter: Göran Erkstam
>            Assignee: Zheng Feng
>            Priority: Major
>             Fix For: 3.0.0, 2.25.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Implement Server Name Indication (SNI) support for the netty4-http client.
> (Has been solved for HttpClient for many years https://issues.apache.org/jira/browse/HTTPCLIENT-1119)
> This could be implemented in the HttpClientInitializerFactory.configureClientSSLOnDemand like this:
> {code:java}
> private SslHandler configureClientSSLOnDemand() throws Exception {
>         if (!producer.getConfiguration().isSsl()) {
>             return null;
>         }        if (producer.getConfiguration().getSslHandler() != null) {
>             return producer.getConfiguration().getSslHandler();
>         } else if (sslContext != null) {
>             URI uri = new URI(nettyProducer.getEndpoint().getEndpointUri());
>             SSLEngine sllEngine = sslContext.createSSLEngine(uri.getHost(), uri.getPort());
>             sllEngine.setUseClientMode(true);
>             SSLParameters sslParameters = sllEngine.getSSLParameters();
>             sslParameters.setServerNames(Arrays.asList(new SNIHostName(uri.getHost())));
>             sllEngine.setSSLParameters(sslParameters);
>             if (producer.getConfiguration().getSslContextParameters() == null) {
>                 // just set the enabledProtocols if the SslContextParameter doesn't set
>                 engine.setEnabledProtocols(producer.getConfiguration().getEnabledProtocols().split(","));
>             }
>             return new SslHandler(engine);
>         }        return null;
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)