oscerd opened a new pull request, #28305: URL: https://github.com/apache/camel/pull/28305
Jira: https://issues.apache.org/jira/browse/CAMEL-25964 ### Problem In `VertxHelper.setupSSLOptions(...)` (camel-vertx-common), Vert.x `TCPSSLOptions` are configured from `SSLContextParameters`. When `TrustManagersParameters` is configured with a standalone `TrustManager` via `setTrustManager(...)` without a `KeyStore`, `createTrustManagerFactory(...)` returns `null` because no keystore is present. `VertxHelper` previously checked only whether: ```java if (sslContextParameters.getTrustManagers() != null && sslContextParameters.getTrustManagers().getTrustManager() == TrustAllTrustManager.INSTANCE) { tcpsslOptions.setTrustOptions(TrustOptions.wrap(TrustAllTrustManager.INSTANCE)); } ``` Any other standalone `TrustManager` instance was discarded and not passed to `tcpsslOptions.setTrustOptions(...)`. As a result, `tcpsslOptions.getTrustOptions()` remained `null`, and Vert.x fell back to its default trust configuration. ### Change - `org.apache.camel.component.vertx.common.VertxHelper`: Check whether `sslContextParameters.getTrustManagers() != null && sslContextParameters.getTrustManagers().getTrustManager() != null`. If present, wrap and set it using `TrustOptions.wrap(trustManager)`. When no standalone `TrustManager` is supplied, call `createTrustManagerFactory(camelContext, sslContextParameters)` to configure `TrustManagerFactoryOptions` from the configured keystore. - Upgrade guide 4.24: Added a note documenting that standalone `TrustManager` instances on `SSLContextParameters` are now applied in Vert.x components. ### Tests - Added `VertxHelperTest` in `camel-vertx-common` to test: - Standalone custom `TrustManager` is wrapped and applied. - `TrustAllTrustManager.INSTANCE` is wrapped and applied. - KeyStore-based `TrustManagerFactory` is applied when no standalone manager is set. - No trust options when none is configured. _Claude Code on behalf of oscerd_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
