From 7c19da4fdd75301c7f6fb6cf4364c23d83b42c1b Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Mon, 18 Nov 2024 11:39:50 +0100 Subject: [PATCH] fix(iroh-dns-server): actually use async fs in load_secret_key (#2943) ## Description Fix up the missed change from https://github.com/n0-computer/iroh/pull/2941/files#r1846266661 ## Breaking Changes ## Notes & open questions ## Change checklist - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented. --- iroh-dns-server/src/http/tls.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iroh-dns-server/src/http/tls.rs b/iroh-dns-server/src/http/tls.rs index b0f2ca6af9..f1a78fe2e3 100644 --- a/iroh-dns-server/src/http/tls.rs +++ b/iroh-dns-server/src/http/tls.rs @@ -148,7 +148,9 @@ async fn load_certs( async fn load_secret_key( filename: impl AsRef, ) -> Result> { - let keyfile = std::fs::read(filename.as_ref()).context("cannot open secret key file")?; + let keyfile = tokio::fs::read(filename.as_ref()) + .await + .context("cannot open secret key file")?; let mut reader = std::io::Cursor::new(keyfile); loop {