[ 
https://issues.apache.org/jira/browse/CAMEL-24653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18112689#comment-18112689
 ] 

Guillaume Nodet commented on CAMEL-24653:
-----------------------------------------

PR opened: https://github.com/apache/camel/pull/26205

Replaces external badssl.com dependency with a local SSLServerSocket using a 
self-signed PKCS12 keystore. The self-signed cert is not in the default trust 
store, so SSLHandshakeException is thrown — same test semantics, zero network 
dependency.

_AI agent (Hermes on behalf of gnodet)_

> 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
>            Priority: Minor
>
> 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