Skip to content

Commit c7fdab5

Browse files
committed
add deprecated aliases for backwards compat
1 parent 373f7f3 commit c7fdab5

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

iroh-relay/src/tls.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ pub struct CaTlsConfig {
2424
extra_roots: Vec<CertificateDer<'static>>,
2525
}
2626

27+
/// Renamed to [`CaTlsConfig`].
28+
#[deprecated(since = "1.0.0", note = "Renamed to `CaTlsConfig`")]
29+
pub type CaRootsConfig = CaTlsConfig;
30+
2731
#[derive(derive_more::Debug, Clone)]
2832
enum Mode {
2933
/// Use a compiled-in copy of the root certificates trusted by Mozilla.
@@ -102,6 +106,12 @@ impl CaTlsConfig {
102106
}
103107
}
104108

109+
/// Renamed to [`Self::custom_roots`].
110+
#[deprecated(since = "1.0.0", note = "Renamed to `custom_roots`")]
111+
pub fn custom(roots: impl IntoIterator<Item = CertificateDer<'static>>) -> Self {
112+
Self::custom_roots(roots)
113+
}
114+
105115
/// Creates a [`CaTlsConfig`] that uses a callback function to create a [`ServerCertVerifier`].
106116
///
107117
/// This is an advanced feature and you should only use this if none of the other constructor

iroh/src/endpoint.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,12 @@ impl Builder {
701701
self
702702
}
703703

704+
/// Renamed to [`Builder::ca_tls_config`].
705+
#[deprecated(since = "1.0.0", note = "Renamed to `ca_tls_config`")]
706+
pub fn ca_roots_config(self, ca_roots_config: CaTlsConfig) -> Self {
707+
self.ca_tls_config(ca_roots_config)
708+
}
709+
704710
/// Enables saving the TLS pre-master key for connections.
705711
///
706712
/// This key should normally remain secret but can be useful to debug networking issues

0 commit comments

Comments
 (0)