davsclaus opened a new pull request, #30373: URL: https://github.com/apache/camel/pull/30373
[CAMEL-27229](https://issues.apache.org/jira/browse/CAMEL-27229) ## What changed Without trust settings, an `ftps` endpoint now checks the server certificate against the JVM default trust store: the JDK `cacerts`, or the `javax.net.ssl.trustStore` system property. Before, it kept the default trust manager of Apache Commons Net, which only checks the validity dates of the certificate. - In `FtpsEndpoint.createFtpClient`, when neither `sslContextParameters` nor `ftpClient.trustStore.*` is set, the client gets `TrustManagerUtils.getDefaultTrustManager(null)`. - Endpoints with `sslContextParameters`, with `ftpClient.trustStore.*`, or with a custom `ftpClient` are unchanged. The host name check is unchanged. - The section "FTPS component default trust store" of the FTP component page is rewritten. Its heading is kept, so existing links still work. ## Upgrade note New 4.24 entry: an FTPS server with a self-signed certificate, or one signed by your own certificate authority, needs that certificate in a trust store. Configure it with `ftpClient.trustStore.file` / `password` / `type`, or with `sslContextParameters`. ## Tests - New `FtpsEndpointTrustManagerTest` checks four cases: - the created client uses the JVM default trust manager; - it rejects the self-signed certificate of the test server; - with `ftpClient.trustStore.*` it accepts that certificate; - a custom `ftpClient` keeps its own trust manager. - Two of these fail without the change. - The FTPS ITs that had no trust settings now configure a trust store for the test server certificate (`TRUST_STORE_OPTIONS` in `FtpsServerTestSupport`). - The camel-ftp unit tests (279) and the `FileToFtps*IT` tests on the embedded FTPS server pass. _Claude Code on behalf of Claus Ibsen_ 🤖 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]
