From d8f3f1d0e95352a55cf83dbaac9f500a33ca5d91 Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 20 Nov 2022 22:47:20 -0600 Subject: [PATCH] Add one more log in TLS config --- src/config.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/config.rs b/src/config.rs index 6f8db5a..a03ea3d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -186,6 +186,11 @@ impl Config { let mut certs_reader = BufReader::new(std::fs::File::open(&tls.cert)?); let certs = rustls_pemfile::certs(&mut certs_reader)?; + if certs.is_empty() { + tracing::warn!("No certs read from certificate file"); + return Ok(None); + } + let mut key_reader = BufReader::new(std::fs::File::open(&tls.key)?); let key = rustls_pemfile::read_one(&mut key_reader)?;