mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-04 01:53:27 +08:00
rsa: Return immediately if required-key verification fails
Currently, if image verification with a required key fails, rsa_verify() code tries to find another key to verify the FIT image. This however, is not the intended behavior as the documentation says that required keys "must be verified for the image / configuration to be considered valid". This patch fixes the issue by making rsa_verify() return immediately if the verification of a required key fails. Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@gmail.com>
This commit is contained in:
parent
ce5172cf65
commit
0772a1f497
@ -437,8 +437,7 @@ int rsa_verify(struct image_sign_info *info,
|
||||
if (info->required_keynode != -1) {
|
||||
ret = rsa_verify_with_keynode(info, hash, sig, sig_len,
|
||||
info->required_keynode);
|
||||
if (!ret)
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Look for a key that matches our hint */
|
||||
|
Loading…
Reference in New Issue
Block a user