mirror of
https://github.com/n0-computer/iroh.git
synced 2026-11-30 08:01:44 +00:00
## Description This adds a new mode to fully customize the `rustls::ServerCertVerifier` used for non-iroh TLS requests throughout iroh, and renames `CaRootsConifg` to `CaTlsConfig` (with a deprecated alias to keep backwards compat). A new mode `CaTlsConfig::custom_server_cert_verifier` allows to supply a callback that gets passed a `CryptoProvider` and returns a `Arc<dyn ServerCertVerifier>`. It is indended for advanced usecases like those described in #2901. Fixes #2901 cc @link2xt ## Breaking Changes None. The following items have been deprecated: - `iroh_relay::tls::CaRootsConfig` (also re-exported as `iroh::tls::CaRootsConfig`), use `iroh_relay::tls::CaTlsConfig` instead (also re-exported as `iroh::tls::CaTlsConfig`). - `iroh_relay::tls::CaRootsConfig::custom`, use `CaTlsConfig::custom_roots` instead - `iroh::endpoint::Builder::ca_roots_config`, use`iroh::endpoint::Builder::ca_tls_config` instead ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist <!-- Remove any that are not relevant. --> - [x] Self-review. - [x] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [x] All breaking changes documented.