chiark / gitweb /
changelog: document changes since 0.6.0
[secnet.git] / rsa.c
diff --git a/rsa.c b/rsa.c
index b30fa01a5b10faf5bdf45588280c88b12ad76149..efcb650fc216c3a2965b2bb45d0b85e3158478f3 100644 (file)
--- a/rsa.c
+++ b/rsa.c
@@ -141,9 +141,6 @@ static void rsa_sethash(struct load_ctx *l,
     *in_ops=hash;
 }
 
-static void rsa_pub_sethash(void *sst, struct hash_if *hash) { }
-static void rsa_priv_sethash(void *sst, struct hash_if *hash) { }
-
 static void rsacommon_dispose(struct rsacommon *c)
 {
     free(c->hashbuf);
@@ -344,7 +341,6 @@ static struct rsapub *rsa_loadpub_core(RSAPUB_BNS(RSAPUB_LOADCORE_DEFBN)
     st->cl.apply=NULL;
     st->cl.interface=&st->ops;
     st->ops.st=st;
-    st->ops.sethash=rsa_pub_sethash;
     st->common.hashbuf=NULL;
     st->ops.unpick=rsa_sig_unpick;
     st->ops.check=rsa_sig_check;
@@ -508,7 +504,6 @@ static struct rsapriv *rsa_loadpriv_core(struct load_ctx *l,
     st->cl.apply=NULL;
     st->cl.interface=&st->ops;
     st->ops.st=st;
-    st->ops.sethash=rsa_priv_sethash;
     st->common.hashbuf=NULL;
     st->ops.sign=rsa_sign;
     st->ops.hash=0;
@@ -796,8 +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);
+                   "\"%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);