Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10341

When using SSL, a NettyConsumer set to Client Mode does not initiate a handshake

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.17.1, 2.17.2, 2.17.3
    • Fix Version/s: 2.17.4, 2.18.1, 2.19.0
    • Component/s: camel-netty4
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      When used as a Consumer Netty can be put into clientMode, which will cause it to act as a client rather than a server. However when SSL is enabled on the endpoint the SSL Handshake does not occur.

      DefaultServerInitializerFactory creates a new SslHandler on-demand during channel initialisation, but forces the SSLEngine to not use client mode, regardless of the setting in the NettyConfiguration instance.

      To cause handshakes to happen when in client mode, set the section in DefaultServerInitializerFactory.configureServerSSLOnDemand() to:

      SSLEngine engine = sslContext.createSSLEngine();
      engine.setUseClientMode(consumer.getConfiguration().isClientMode());
      engine.setNeedClientAuth(consumer.getConfiguration().isNeedClientAuth());
      

      For reference see StackOverflow.

        Attachments

          Activity

            People

            • Assignee:
              acosentino Andrea Cosentino
              Reporter:
              mattshaw Matt Shaw
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: