Guillaume Nodet created CAMEL-24653:
---------------------------------------

             Summary: SSLCertTrustTest: replace external badssl.com dependency 
with local self-signed HTTPS endpoint
                 Key: CAMEL-24653
                 URL: https://issues.apache.org/jira/browse/CAMEL-24653
             Project: Camel
          Issue Type: Improvement
          Components: camel-oauth
            Reporter: Guillaume Nodet


The SSLCertTrustTest.testUntrustedCertificate test connects to 
https://untrusted-root.badssl.com to verify that an SSLHandshakeException is 
thrown for untrusted certificates. This relies on an external resource that may 
be unreachable in CI environments (network restrictions, DNS issues), causing 
flaky failures.

Replace the external dependency with a local HTTPS endpoint using a self-signed 
certificate whose CA is not in the trust store. This can be done with a 
lightweight embedded server (e.g. Jetty or raw SSLServerSocket) started in a 
@BeforeAll / @RegisterExtension, using a programmatically generated self-signed 
cert.

This eliminates the external network dependency while preserving the same test 
semantics (SSLHandshakeException on untrusted cert).

Related: CAMEL-24599 (flaky test report for the same test)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to