pvsecret: improve warning if host key document contains multiple certificates

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 <seiden@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2024-02-01 15:34:25 +01:00
committed by Jan Höppner
parent 0f433b1142
commit 2a0f1e6977

View File

@@ -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