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 <xiuli.pan@linux.intel.com>
This commit is contained in:
Pan Xiuli 2018-05-11 15:55:39 +08:00 committed by Daniel Leung
parent 8aedb1c3e7
commit 3530b55759
1 changed files with 2 additions and 1 deletions

View File

@ -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); fprintf(stdout, " pkcs: signing with key %s\n", image->key_name);
fp = fopen(image->key_name, "r"); fp = fopen(image->key_name, "r");
if (fp == NULL) { 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; return -errno;
} }
PEM_read_PrivateKey(fp, &privkey, NULL, NULL); PEM_read_PrivateKey(fp, &privkey, NULL, NULL);