tmielke opened a new pull request, #25446: URL: https://github.com/apache/camel/pull/25446
# Description When a custom `HostnameVerifier` (e.g. `NoopHostnameVerifier`) was configured on the AS2 endpoint, it was silently ignored. The `DefaultClientTlsStrategy` defaulted to `HostnameVerificationPolicy.BOTH`, which sets `endpointIdentificationAlgorithm="HTTPS"` on the `SSLParameters`. This causes the JDK trust manager to perform hostname verification during the TLS handshake, before the custom `HostnameVerifier` ever runs. Fix: use `HostnameVerificationPolicy.CLIENT` when a custom `HostnameVerifier` is provided, so hostname verification is delegated entirely to it. Also in `MendelsonSslEndpointManualTest`: - Replace bare `assertNull` with a lazy message that surfaces the root cause exception, since AS2 wraps low-level exceptions in multiple layers - Remove dead `setSigningAlgorithm(MD2WITHRSA)` call that was immediately overridden by the signingAlgorithm URI parameter on the endpoint - Drop unnecessary public modifier from test class and methods Co-Authored-By: Claude Opus 4.6 <[email protected]> # Target - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch) # Tracking - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it). # Apache Camel coding standards and style - [x] I checked that each commit in the pull request has a meaningful subject line and body. - [x] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes. # AI-assisted contributions - [x] If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR description identifies the AI tool used. -- 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]
