From 3223d93cb3c77ab02aa0a35f2a8314e447cee9a4 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 9 Jul 2026 21:43:23 +0200 Subject: chore: Separate daemon, client, server, and lib into crates --- crates/client/src/atuin_common/tls.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 crates/client/src/atuin_common/tls.rs (limited to 'crates/client/src/atuin_common/tls.rs') diff --git a/crates/client/src/atuin_common/tls.rs b/crates/client/src/atuin_common/tls.rs new file mode 100644 index 00000000..3736f878 --- /dev/null +++ b/crates/client/src/atuin_common/tls.rs @@ -0,0 +1,15 @@ +use std::sync::Once; + +static INIT: Once = Once::new(); + +/// Ensure the rustls crypto provider (ring) is installed. +/// +/// Must be called before creating any reqwest clients. Safe to call +/// multiple times — only the first call installs the provider. +pub(crate) fn ensure_crypto_provider() { + INIT.call_once(|| { + rustls::crypto::ring::default_provider() + .install_default() + .expect("Failed to install rustls crypto provider"); + }); +} -- cgit v1.3.1