davsclaus opened a new pull request, #31386:
URL: https://github.com/apache/camel/pull/31386

   _Claude Code on behalf of Claus Ibsen_
   
   JIRA: [CAMEL-28115](https://issues.apache.org/jira/browse/CAMEL-28115) 
(camel-as2 - the sslContextParameters of the component are not used)
   
   ## Problem
   
   The camel-as2 component options `sslContextParameters` and 
`useGlobalSslContextParameters` were turned into an
   `SSLContext` in `AS2Endpoint.doStart()`, after `afterConfigureProperties()` 
had already created the client connection
   (`client/send`), the server listener (`server/listen`) or the asynchronous 
MDN listener (`receipt/receive`) with no
   `SSLContext`. So an endpoint whose only TLS setting was the component option 
connected and listened over plain HTTP.
   Setting `sslContext` on the endpoint worked.
   
   On `main` the ordering is already corrected by #31354 (camel-as2 keystore, 
truststore and PEM options), which resolves
   the `SSLContext` before the connections are created. That PR tests the 
client side. The same ordering change is
   being ported to `camel-4.22.x` (4.22.4) and `camel-4.18.x` (4.18.7) in 
separate PRs.
   
   ## Change
   
   - New `AS2ComponentSslContextParametersTest`, with only component-level TLS 
settings on one side of each exchange:
     - `clientSendsWithTheSslContextParametersOfTheComponent`: an HTTPS-only 
`server/listen` endpoint (own `sslContext`)
       and a `client/send` endpoint whose only TLS setting is the component 
`sslContextParameters`.
     - `serverListensWithTheSslContextParametersOfTheComponent`: a 
`server/listen` endpoint whose only TLS setting is the
       component `sslContextParameters`, called by an HTTPS client.
     - `serverListensWithTheGlobalSslContextParameters`: the same with 
`useGlobalSslContextParameters=true` and the
       global SSL context parameters of the CamelContext.
     - `receiptListensWithTheGlobalSslContextParameters`: a TLS handshake with 
the `receipt/receive` listener of a
       component with `useGlobalSslContextParameters=true`.
   
     Keystores are generated in a `@TempDir` and the ports come from 
`AvailablePortFinder`. The test uses only options
     that also exist on the maintenance branches, so the backports use the same 
test.
   - Upgrade guide entries on `main` for the backports: 
`camel-4x-upgrade-guide-4_22.adoc` ("Upgrading from 4.22.3 to
     4.22.4") and `camel-4x-upgrade-guide-4_18.adoc` ("Upgrading from 4.18.6 to 
4.18.7"), the same note as in the 4.25
     guide, without the endpoint `sslContextParameters` option that only exists 
on `main`.
   
   No production code changes on `main`, and no generated files change.
   
   ## Tests
   
   - `AS2ComponentSslContextParametersTest`: 4 tests pass. With the 
`SSLContext` resolved in `doStart()` again (the
     previous ordering), all 4 fail: the client reaches the HTTPS-only server 
without TLS (`NoHttpResponseException`),
     and the HTTPS clients get `SSLException: Unsupported or unrecognized SSL 
message` from the listeners.
   - All unit tests of `camel-as2-component` pass.
   
   🤖 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]

Reply via email to