mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
image: Combine image_sig_algo with image_sign_info
Remove the need to explicitly add SHA/RSA pairings. Invalid SHA/RSA pairings will still fail on verify operations when the hash length is longer than the key length. Follow the same naming scheme "checksum,crytpo" without explicitly defining the string. Indirectly adds support for "sha1,rsa4096" signing/verification. Signed-off-by: Andrew Duda <aduda@meraki.com> Signed-off-by: aduda <aduda@meraki.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -244,7 +244,7 @@ int rsa_sign(struct image_sign_info *info,
|
||||
ret = rsa_get_priv_key(info->keydir, info->keyname, &rsa);
|
||||
if (ret)
|
||||
goto err_priv;
|
||||
ret = rsa_sign_with_key(rsa, info->algo->checksum, region,
|
||||
ret = rsa_sign_with_key(rsa, info->checksum, region,
|
||||
region_count, sigp, sig_len);
|
||||
if (ret)
|
||||
goto err_sign;
|
||||
@@ -508,7 +508,7 @@ int rsa_add_verify_data(struct image_sign_info *info, void *keydest)
|
||||
}
|
||||
if (!ret) {
|
||||
ret = fdt_setprop_string(keydest, node, FIT_ALGO_PROP,
|
||||
info->algo->name);
|
||||
info->name);
|
||||
}
|
||||
if (!ret && info->require_keys) {
|
||||
ret = fdt_setprop_string(keydest, node, "required",
|
||||
|
Reference in New Issue
Block a user