From: Ian Jackson Date: Sun, 6 Oct 2019 22:14:48 +0000 (+0100) Subject: rsa1: Drop filename from two error messages X-Git-Tag: v0.6.0~173 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=secnet.git;a=commitdiff_plain;h=934cb196c3928724c351045f25c740a830941e4a rsa1: Drop filename from two error messages The scheme loading interface doesn't provide the filename (and it will handle logging it if need be). For the rsapriv_apply closure, the config location will allow one to find the filename which seems sufficient to me. Signed-off-by: Ian Jackson --- diff --git a/rsa.c b/rsa.c index 63816ee..d5d80ff 100644 --- a/rsa.c +++ b/rsa.c @@ -391,8 +391,7 @@ static void rsapriv_dispose(void *sst) static struct rsapriv *rsa_loadpriv_core(struct rsapriv_load_ctx *l, FILE *f, struct cloc loc, - bool_t do_validity_check, - const char *filename) + bool_t do_validity_check) { struct rsapriv *st=0; long length; @@ -437,8 +436,7 @@ static struct rsapriv *rsa_loadpriv_core(struct rsapriv_load_ctx *l, b=safe_malloc(length,"rsapriv_apply"); if (fread(b,length,1,f)!=1 || memcmp(b,AUTHFILE_ID_STRING,length)!=0) { LDUNSUP_FILE("failed to read magic ID" - " string from SSH1 private keyfile \"%s\"\n", - filename); + " string from SSH1 private keyfile\n"); } FREE(b); @@ -596,8 +594,8 @@ static struct rsapriv *rsa_loadpriv_core(struct rsapriv_load_ctx *l, done_checks: if (!valid) { - LDFATAL("file \"%s\" does not contain a " - "valid RSA key!\n",filename); + LDFATAL("file does not contain a " + "valid RSA key!\n"); } assume_valid: @@ -678,7 +676,7 @@ static list_t *rsapriv_apply(closure_t *self, struct cloc loc, dict_t *context, do_validity_check=False; } - st=rsa_loadpriv_core(l,f,loc,do_validity_check,filename); + st=rsa_loadpriv_core(l,f,loc,do_validity_check); fclose(f); return new_closure(&st->cl); }