[ 
https://issues.apache.org/jira/browse/CAMEL-17992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528308#comment-17528308
 ] 

Karen Lease edited comment on CAMEL-17992 at 4/26/22 5:11 PM:
--------------------------------------------------------------

I analyzed this and found the cause. In fact the spring parameters are 
correctly set in the configuration on the NettyComponent. But then it calls 
NettyConfiguration.parseURI() and if this does not find "ssl=true" in the URI 
for the endpoint, it sets it to false, overriding the configuration. I'll push 
a fix.


was (Author: klease78):
I analyzed this and found the cause. In fact the spring parameters are 
correctly and set in the configuration on the NettyComponent. But then it calls 
NettyConfigiratop,.parseURI() and if this does not find "ssl=true" in the URI 
for the endpoint, it sets it to false, overriding the configuration. I'll push 
a fix.

> camel-netty-starter - camel.component.netty.ssl-context-parameters does not 
> work
> --------------------------------------------------------------------------------
>
>                 Key: CAMEL-17992
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17992
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-netty, camel-spring-boot-starters
>    Affects Versions: 3.14.2, 3.16.0
>            Reporter: Vincenzo Galluccio
>            Assignee: Karen Lease
>            Priority: Minor
>             Fix For: 3.17.0
>
>
> Setting the *camel.component.netty.ssl-context-parameters* 
> (camel-netty-starter) does not work. 
> The application starts but then when I produce a message (NettyProducer), it 
> fails because from what I can see in the logs the Channel has not been 
> configured with SSL (SSLEngine not configured, Client SSL handler not 
> configured).
> If I use the query parameter instead: 
> `{*}&ssl=true&sslContextParameters=#sslContextParameters{*}` it works just 
> fine.
> For reference, this is how I set the springboot properties:
> {code:java}
> camel.component.netty.ssl=true
> camel.component.netty.ssl-context-parameters=#sslContextParameters
> {code}
> This is an example of how the Spring bean looks like:
> {code:java}
> @Bean(name = "sslContextParameters")
> public SSLContextParameters getSSLContextParameters() {
> // code omitted to keep it short
> SSLContextParameters scp = new SSLContextParameters();
> scp.setSecureSocketProtocol("TLSv1.2");
> scp.setSecureSocketProtocols(sspp);
> scp.setServerParameters(scsp);
> scp.setClientParameters(sccp);
> scp.setKeyManagers(kmp);
> scp.setTrustManagers(tmp);
> return scp;{code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to