From 2a0f1e6977b49f2478f38742aea91aee8cefbeb1 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Thu, 1 Feb 2024 15:34:25 +0100 Subject: [PATCH] pvsecret: improve warning if host key document contains multiple certificates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improve the warning for the case where a host key document contains multiple certificates (only possible for a PEM file). In case there are multiple host key document only the first certificate is used. Reviewed-by: Steffen Eiden Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- rust/pvsecret/src/cmd/create.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/pvsecret/src/cmd/create.rs b/rust/pvsecret/src/cmd/create.rs index 1beca523..203c65df 100644 --- a/rust/pvsecret/src/cmd/create.rs +++ b/rust/pvsecret/src/cmd/create.rs @@ -191,7 +191,7 @@ fn read_and_verify_hkds( return Err(anyhow!(msg)); } if certs.len() > 1 { - warn!("The host key document in '{hkd}' contains more than one certificate!") + warn!("The host key document in '{hkd}' contains more than one certificate! Only the first certificate will be used.") } // len is >= 1 -> unwrap will succeed