From 056032a8d468008b1de85c6b48aad26ca02dd75d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 24 May 2020 18:35:42 +0100 Subject: [PATCH] rsa: Print errno value if we fail to open key file Signed-off-by: Ian Jackson --- rsa.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rsa.c b/rsa.c index 1d3c0e8..efcb650 100644 --- a/rsa.c +++ b/rsa.c @@ -791,9 +791,10 @@ static list_t *rsapriv_apply(closure_t *self, struct cloc loc, dict_t *context, if (!f) { if (just_check_config) { Message(M_WARNING,"rsa-private (%s:%d): cannot open keyfile " - "\"%s\"; assuming it's valid while we check the " - "rest of the configuration\n",loc.file,loc.line,filename); - return NULL; + "\"%s\" (%s); assuming it's valid while we check the " + "rest of the configuration\n", + loc.file,loc.line,filename,strerror(errno)); + return list_new(); } else { fatal_perror("rsa-private (%s:%d): cannot open file \"%s\"", loc.file,loc.line,filename); -- 2.30.2