From ffa3e84584b1da48e6534ec7f33ded581fcccf4b Mon Sep 17 00:00:00 2001 From: Pan Xiuli Date: Fri, 11 May 2018 15:55:39 +0800 Subject: [PATCH] rimage: fix wrong error message If keyname can not be open, error message should output keyname insert of tmp path. Signed-off-by: Pan Xiuli --- rimage/pkcs1_5.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rimage/pkcs1_5.c b/rimage/pkcs1_5.c index 7df531bff..0c91df039 100644 --- a/rimage/pkcs1_5.c +++ b/rimage/pkcs1_5.c @@ -82,7 +82,8 @@ int pkcs_sign(struct image *image, struct fw_image_manifest *man, fprintf(stdout, " pkcs: signing with key %s\n", image->key_name); fp = fopen(image->key_name, "r"); if (fp == NULL) { - fprintf(stderr, "error: can't open file %s %d\n", path, -errno); + fprintf(stderr, "error: can't open file %s %d\n", + image->key_name, -errno); return -errno; } PEM_read_PrivateKey(fp, &privkey, NULL, NULL);