mirror of https://github.com/thesofproject/sof.git
pkcs1_5.c: don't pretend everything is fine when failing to sign
Found by chance and reproduced by making a typo in the key's filename. Note there is already an (unchanged) error message: pkcs: signing with key sof/keys/otc_private_key_3k.pemX error: can't open file sof/keys/otc_private_key_3k.pemX -2 Firmware manifest and signing completed ! But now rimage does not pretend success and the build does not keep going with an unsigned image like nothing happened. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
e87db0f080
commit
b9cf1aeb3b
|
@ -247,8 +247,7 @@ int ri_manifest_sign_v1_5(struct image *image)
|
|||
char *const data1 = (char *)man + MAN_CSS_MAN_SIZE_V1_5;
|
||||
unsigned const size1 = image->image_end - sizeof(*man);
|
||||
|
||||
pkcs_v1_5_sign_man_v1_5(image, man, data1, size1);
|
||||
return 0;
|
||||
return pkcs_v1_5_sign_man_v1_5(image, man, data1, size1);
|
||||
}
|
||||
|
||||
int ri_manifest_sign_v1_8(struct image *image)
|
||||
|
@ -265,6 +264,5 @@ int ri_manifest_sign_v1_8(struct image *image)
|
|||
unsigned const size2 =
|
||||
(man->css.size - man->css.header_len) * sizeof(uint32_t);
|
||||
|
||||
pkcs_v1_5_sign_man_v1_8(image, man, data1, size1, data2, size2);
|
||||
return 0;
|
||||
return pkcs_v1_5_sign_man_v1_8(image, man, data1, size1, data2, size2);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue