davsclaus commented on code in PR #30891:
URL: https://github.com/apache/camel/pull/30891#discussion_r4713369248


##########
components/camel-vertx/camel-vertx-common/src/main/java/org/apache/camel/component/vertx/common/VertxHelper.java:
##########
@@ -127,9 +145,40 @@ public static void setupSSLOptions(
             if (protocols) {
                 tcpsslOptions.setEnabledSecureTransportProtocols(new 
LinkedHashSet<>(List.of(engine.getEnabledProtocols())));
             }
+            String[] groups = engine.getSSLParameters().getNamedGroups();
+            if ((namedGroups || postQuantum) && groups != null) {
+                // Vert.x applies its key exchange groups on each SSLEngine it 
creates, server and client side
+                sslOptions(tcpsslOptions).setKeyExchangeGroups(new 
ArrayList<>(List.of(groups)));
+            }
+        }
+
+        // Vert.x has no setting for the signature schemes
+        if (sslContextParameters.getSignatureSchemes() != null || 
sslContextParameters.getSignatureSchemesFilter() != null) {
+            LOG.warn("Vert.x cannot apply the signature schemes of 
sslContextParameters, as its TLS options have no such"
+                     + " setting: the signature schemes of the JVM are used 
instead");
         }
     }
 
+    /**
+     * The SSL options of the given TCP SSL options, which Vert.x creates on 
the first SSL setting.
+     */
+    private static SSLOptions sslOptions(TCPSSLOptions tcpsslOptions) {
+        SSLOptions answer = tcpsslOptions.getSslOptions();
+        if (answer == null) {
+            // setting a value creates them, so set the one they already have
+            
tcpsslOptions.setSslHandshakeTimeout(tcpsslOptions.getSslHandshakeTimeout());
+            answer = tcpsslOptions.getSslOptions();
+        }
+        return answer;
+    }

Review Comment:
   I kept the workaround: `getOrCreateSSLOptions()` is `protected` in 
vertx-core 5.2.3 (`javap` shows `protected io.vertx.core.net.SSLOptions 
getOrCreateSSLOptions()`), and `VertxHelper` is not a subclass of 
`TCPSSLOptions`, so it cannot call it. Each SSL setter of `TCPSSLOptions` calls 
it, `setSslHandshakeTimeout(long)` included. e80d2ef3b5 says so in the comment. 
If a Vert.x upgrade changes this, `VertxHelperNamedGroupsTest` fails: it 
asserts `getSslOptions().getKeyExchangeGroups()` and checks the groups in real 
handshakes.
   
   _Claude Code on behalf of Claus Ibsen_



##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -642,6 +642,22 @@ all `https://` addresses.
 A route that called an `https://` address of a server that only speaks plain 
HTTP now fails; use an `http://` address
 for such a server. An `http://` address with `sslContextParameters` is not 
changed.
 
+=== camel-vertx, camel-platform-http-vertx, camel-kafka, camel-thrift - the 
named groups of sslContextParameters
+
+The Vert.x components (`camel-platform-http-vertx`, `camel-vertx-http` and 
`camel-vertx-websocket`) now apply the

Review Comment:
   Done in e80d2ef3b5: the paragraph now lists `camel-vertx-mqtt`. It also 
lists `camel-apicurio-registry`, which passes its `WebClientOptions` through 
`VertxHelper.setupSSLOptions` as well. The table in 
`camel-configuration-utilities.adoc` now names `camel-apicurio-registry` too.
   
   _Claude Code on behalf of Claus Ibsen_



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to