From f294c5bca990f684b59f217dd468a41b7ac83d0e Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Tue, 27 Jan 2026 16:20:25 -0800 Subject: chore(deps): audit ssl deps (#3110) ## Checks - [ ] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [ ] I have checked that there are no existing pull requests for the same thing --- crates/atuin-common/src/lib.rs | 1 + crates/atuin-common/src/tls.rs | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 crates/atuin-common/src/tls.rs (limited to 'crates/atuin-common/src') diff --git a/crates/atuin-common/src/lib.rs b/crates/atuin-common/src/lib.rs index 75bfc3e9..91164a82 100644 --- a/crates/atuin-common/src/lib.rs +++ b/crates/atuin-common/src/lib.rs @@ -56,4 +56,5 @@ macro_rules! new_uuid { pub mod api; pub mod record; pub mod shell; +pub mod tls; pub mod utils; diff --git a/crates/atuin-common/src/tls.rs b/crates/atuin-common/src/tls.rs new file mode 100644 index 00000000..e8c840e0 --- /dev/null +++ b/crates/atuin-common/src/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 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