Skip to content

Commit 7c19da4

Browse files
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 <!-- Optional, if there are any breaking changes document them, including how to migrate older code. --> ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## 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.
1 parent ccfc700 commit 7c19da4

File tree

1 file changed

+3
-1
lines changed
  • iroh-dns-server/src/http

1 file changed

+3
-1
lines changed

iroh-dns-server/src/http/tls.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ async fn load_certs(
148148
async fn load_secret_key(
149149
filename: impl AsRef<Path>,
150150
) -> Result<rustls::pki_types::PrivateKeyDer<'static>> {
151-
let keyfile = std::fs::read(filename.as_ref()).context("cannot open secret key file")?;
151+
let keyfile = tokio::fs::read(filename.as_ref())
152+
.await
153+
.context("cannot open secret key file")?;
152154
let mut reader = std::io::Cursor::new(keyfile);
153155

154156
loop {

0 commit comments

Comments
 (0)