From: Ian Jackson Date: Sun, 24 May 2020 12:42:09 +0000 (+0100) Subject: rsa: Do not crash with -j if key file does not exist X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=800c04e5b55daf642bb07b364d79730a885f23cb;p=secnet.git rsa: Do not crash with -j if key file does not exist This was messed up by 58913a3b93a6 rsa1: Break rsa_loadpriv_core out of rsapriv_apply where the early exit path should have been handled in both places but wasn't. Signed-off-by: Ian Jackson --- diff --git a/rsa.c b/rsa.c index 6a89b21..1d3c0e8 100644 --- a/rsa.c +++ b/rsa.c @@ -793,6 +793,7 @@ static list_t *rsapriv_apply(closure_t *self, struct cloc loc, dict_t *context, 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; } else { fatal_perror("rsa-private (%s:%d): cannot open file \"%s\"", loc.file,loc.line,filename);