diff --git a/Cargo.lock b/Cargo.lock index 4c3ba7426e..d12a19badc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -134,6 +134,7 @@ dependencies = [ "regex", "reqwest", "runtime", + "rustls 0.23.10", "schemars", "serde", "serde_json", diff --git a/crates/agent/Cargo.toml b/crates/agent/Cargo.toml index 3776cd6ec8..dd7e7ec103 100644 --- a/crates/agent/Cargo.toml +++ b/crates/agent/Cargo.toml @@ -49,6 +49,7 @@ lazy_static = { workspace = true } rand = { workspace = true } regex = { workspace = true } reqwest = { workspace = true } +rustls = { workspace = true } schemars = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } diff --git a/crates/agent/src/main.rs b/crates/agent/src/main.rs index 874b5bb521..cfe59e4cff 100644 --- a/crates/agent/src/main.rs +++ b/crates/agent/src/main.rs @@ -51,6 +51,12 @@ struct Args { } fn main() -> Result<(), anyhow::Error> { + // Required in order for libraries to use `rustls` for TLS. + // See: https://docs.rs/rustls/latest/rustls/crypto/struct.CryptoProvider.html + rustls::crypto::aws_lc_rs::default_provider() + .install_default() + .expect("failed to install default crypto provider"); + // Use reasonable defaults for printing structured logs to stderr. let subscriber = tracing_subscriber::FmtSubscriber::builder() .with_env_filter(tracing_subscriber::EnvFilter::from_default_env())