tokio-xmpp: re-export rustls if using rustls backend

Jonas Schäfer created

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.

Change summary

tokio-xmpp/ChangeLog  | 2 ++
tokio-xmpp/src/lib.rs | 3 +++
2 files changed, 5 insertions(+)

Detailed changes

tokio-xmpp/ChangeLog 🔗

@@ -28,6 +28,8 @@ XXXX-YY-ZZ RELEASER <admin@example.com>
     * 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

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;