From 78714475b27d064534d9b119dffe415f52fe2c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Sat, 10 May 2025 09:23:56 +0200 Subject: [PATCH] tokio-xmpp: re-export rustls if using rustls backend The user may have to call some global rustls functions depending on the exact feature set of rustls enabled. Hence, we have to expose it. Concretely, if the user somehow ends up with more than one rustls backend, they have to configure one of the backends as default backend at startup. --- tokio-xmpp/ChangeLog | 2 ++ tokio-xmpp/src/lib.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tokio-xmpp/ChangeLog b/tokio-xmpp/ChangeLog index e8664729f55f0ed3b9ebaae8d851ecea21a59a36..e3c10152d92f2c3f301ac104474ecbb1193311c8 100644 --- a/tokio-xmpp/ChangeLog +++ b/tokio-xmpp/ChangeLog @@ -28,6 +28,8 @@ XXXX-YY-ZZ RELEASER * Added: - Support for sending IQ requests while tracking their responses in a Future. + - `rustls` is now re-exported if it is enabled, to allow applications to + set the default crypto provider if needed. (!581) * Changes: - On Linux, once the TLS session is established, we can delegate the actual encryption and decryption to the kernel, which in turn can diff --git a/tokio-xmpp/src/lib.rs b/tokio-xmpp/src/lib.rs index cd9f3aec10b9f663e7caad7a5e41d3307e88efdb..5f2dbe1de961bddfe077cf388cb60ce7f76cff89 100644 --- a/tokio-xmpp/src/lib.rs +++ b/tokio-xmpp/src/lib.rs @@ -51,6 +51,9 @@ extern crate alloc; pub use parsers::{jid, minidom}; pub use xmpp_parsers as parsers; +#[cfg(feature = "tls-rust")] +pub use tokio_rustls::rustls; + mod client; #[cfg(feature = "insecure-tcp")] mod component;