Repository navigation
[backport camel-4.22.x] CAMEL-25964: camel-vertx - VertxHelper does not apply standalone TrustManager from SSLContextParameters - #28345
Conversation
…ot apply standalone TrustManager from SSLContextParameters
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 25 tested, 28 compile-only — current: 24 all testedMaveniverse Scalpel detected 53 affected modules (current approach: 24).
|
gnodet-bot
left a comment
There was a problem hiding this comment.
Clean backport of CAMEL-25964. The fix correctly generalizes the trust manager handling in VertxHelper.setupSSLOptions(): previously only TrustAllTrustManager.INSTANCE was explicitly handled, leaving all other standalone TrustManager instances silently ignored. The new code uses TrustOptions.wrap(trustManager) for any non-null standalone TrustManager, with the factory-based path as the fallback — matching the Vert.x-idiomatic approach and aligning with all other Camel components that use SSLContextParameters.
Pre-fix test validation: static analysis confirms testCustomTrustManagerApplied() would have been RED before the fix — the old code path returns null from createTrustManagerFactory() (no keystore configured) and the identity check == TrustAllTrustManager.INSTANCE fails for a custom manager, leaving getTrustOptions() null and causing the assertThat(...).isNotNull() assertion to fail.
Fix covers all consumers of VertxHelper (platform-http-vertx, vertx-http, vertx-websocket). Upgrade guide documentation is accurate. CRLF→LF normalization in the diff is cosmetic and correct.
Side note: camel-4.18.x (LTS) has the same bug — worth a separate backport there.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
davsclaus
left a comment
There was a problem hiding this comment.
TL;DR
The code, the test, pom.xml and the truststore are the same as #28305, and CI is green with VertxHelperTest passing. Only the upgrade note needs a follow-up.
Blockers: None
Other findings: 2
Upgrade guide section. The note at camel-4x-upgrade-guide-4_22.adoc:2090 is at the end of the file, inside "Upgrading Camel 4.21 to 4.22". The change ships in 4.22.3, so it belongs under "Upgrading from 4.22.2 to 4.22.3" (line 14), where users who upgrade from 4.22.2 look. Note that #28347 also appends its note at the end of this file, so the second of the two to merge gets a conflict there.
Main sync. The 4.22 guide on main does not have this note yet. Please add it there in the "4.22.2 to 4.22.3" section. One main PR can also carry the 4.18.6 note (see #28346) and the camel-as2 notes (#28347, #28348).
VertxHelper.java shows as a whole-file change because its line endings change from CRLF to LF, as in #28305. The result is the same file as on main.
Reviewed with Claude Code on behalf of @davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.
Backport of #28305
Cherry-pick of c78e59f to camel-4.22.x.
Conflicts resolved automatically by backport bot agent.