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

   ## Summary
   
   Replace the external `https://untrusted-root.badssl.com` dependency in 
`SSLCertTrustTest.testUntrustedCertificate` with a local HTTPS endpoint using a 
self-signed certificate.
   
   ## Problem
   
   The test connects to an external site to verify that `SSLHandshakeException` 
is thrown for untrusted certificates. This relies on network access that may be 
unavailable in CI environments (network restrictions, DNS issues), causing 
flaky failures (see CAMEL-24599).
   
   ## Solution
   
   - Start a local `SSLServerSocket` in `@BeforeAll` on an OS-assigned random 
port, backed by a self-signed PKCS12 keystore (stored in test resources)
   - The self-signed certificate's CA is not in the JVM's default trust store, 
so connecting to it with `HttpsURLConnection` throws `SSLHandshakeException` — 
same semantics as the original test
   - Shut down the server in `@AfterAll`
   - Add connect/read timeouts (10s) to `connectToUrl()` to prevent indefinite 
hangs
   
   No external dependencies added — uses only JDK `javax.net.ssl` APIs.
   
   Supersedes #26184 which took a different approach (skip test when 
unreachable).
   
   _AI agent (Hermes on behalf of gnodet)_


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