oscerd commented on PR #26164:
URL: https://github.com/apache/camel/pull/26164#issuecomment-5570222305

   Thanks @davsclaus — good catch to check, and the good news is the 
user-facing configuration here **is** already the Camel standard 
`SSLContextParameters`, not a raw JDK `SSLContext`:
   
   - `AS2Component` implements `SSLContextParametersAware` and exposes 
`sslContextParameters` (it also honours global SSL parameters).
   - `AS2Endpoint.doStart()` converts it — 
`params.createSSLContext(getCamelContext())` — into 
`AS2Configuration.sslContext`, which then flows `AS2ConnectionHelper → 
AS2ServerConnection → AS2AsynchronousMDNManager`. This PR simply reuses that 
same, already-derived `SSLContext` for the outbound asynchronous‑MDN delivery.
   
   The raw `SSLContext`/`SSLParameters` you spotted live in `camel-as2-api`, 
which has no dependency on `camel-support`, so that low‑level module can only 
take a JDK `SSLContext`; the `SSLContextParameters → SSLContext` conversion 
stays in the component layer (the usual Camel split, same as the inbound server 
side already does). So an operator configures `sslContextParameters` on the AS2 
endpoint exactly like the other components — nothing JDK‑specific is exposed to 
the route author.
   
   One concrete improvement I can make if you'd like: hostname verification is 
currently set imperatively 
(`sslParameters.setEndpointIdentificationAlgorithm("HTTPS")`). I could instead 
drive it from the client side of `SSLContextParameters` 
(`SSLContextClientParameters`) so it's configurable the Camel way rather than 
hard‑coded. Happy to wire that in — just let me know.
   
   _Claude Code on behalf of Andrea Cosentino_
   


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