chiark / gitweb /
rsa: Print errno value if we fail to open key file
[secnet.git] / rsa.c
diff --git a/rsa.c b/rsa.c
index 1d3c0e80b4fe69628e723680ced15a55618898a2..efcb650fc216c3a2965b2bb45d0b85e3158478f3 100644 (file)
--- 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);