Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion engine/packages/guard/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub async fn start(config: rivet_config::Config, pools: rivet_pools::Pools) -> R
Id::new_v1(config.dc_label()),
)?;

// Initialize with a default CryptoProvider for rustls
// Initialize rustls with the default ring CryptoProvider.
let provider = rustls::crypto::ring::default_provider();
if provider.install_default().is_err() {
tracing::debug!("crypto provider already installed in this process");
Expand Down
1 change: 1 addition & 0 deletions engine/packages/pools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ reqwest.workspace = true
rivet-config.workspace = true
rivet-metrics.workspace = true
rivet-util.workspace = true
rustls.workspace = true
serde.workspace = true
tempfile.workspace = true
thiserror.workspace = true
Expand Down
11 changes: 11 additions & 0 deletions engine/packages/pools/src/pools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ impl Pools {
let token = CancellationToken::new();
let node_id = NodeId::new();

install_rustls_provider();

let (ups, udb) = tokio::try_join!(
crate::db::ups::setup(&config, client_name),
crate::db::udb::setup(&config),
Expand Down Expand Up @@ -55,6 +57,8 @@ impl Pools {
let token = CancellationToken::new();
let node_id = NodeId::new();

install_rustls_provider();

let (ups, udb) = tokio::try_join!(
crate::db::ups::setup(&config, client_name),
crate::db::udb::setup(&config),
Expand Down Expand Up @@ -97,3 +101,10 @@ impl Pools {
self.0.udb.clone().ok_or(Error::MissingUdbPool.into())
}
}

fn install_rustls_provider() {
let provider = rustls::crypto::ring::default_provider();
if provider.install_default().is_err() {
tracing::debug!("crypto provider already installed in this process");
}
}
Loading