Skip to content

Commit a38e3ee

Browse files
committed
fix: set default crypto provider for iroh-relay binary
1 parent 9b01751 commit a38e3ee

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

iroh-relay/src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,14 @@ async fn main() -> Result<()> {
496496
.with(EnvFilter::from_default_env())
497497
.init();
498498

499+
// Install `ring` as default crypto provider for rustls.
500+
// `ring` is enabled by the `tls-ring` feature, which is included in the `server`
501+
// feature, which is required for the main.rs binary.
502+
// Therefore, this does not need any feature flags.
503+
rustls::crypto::ring::default_provider()
504+
.install_default()
505+
.expect("failed to set default crypto provider");
506+
499507
let cli = Cli::parse();
500508
let mut cfg = Config::load(&cli).await?;
501509
if cfg.enable_quic_addr_discovery && cfg.tls.is_none() {

0 commit comments

Comments
 (0)