diff options
author | Simon Glass | 2021-11-12 12:28:11 -0700 |
---|---|---|
committer | Simon Glass | 2022-01-26 08:50:44 -0700 |
commit | c033dc8c0c4b744e028e124f88be4829309c75d1 (patch) | |
tree | 8b29d79edab956df71ecf9529f34b102842b54be /lib | |
parent | 99f844ba3a6b3ddd73742cddf7dee955bbb96c61 (diff) |
image: Return destination node for add_verify_data() method
It is useful to know where the verification data was written. Update the
API to return this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ecdsa/ecdsa-libcrypto.c | 4 | ||||
-rw-r--r-- | lib/rsa/rsa-sign.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/ecdsa/ecdsa-libcrypto.c b/lib/ecdsa/ecdsa-libcrypto.c index ae6dfa0ba97..d5939af2c56 100644 --- a/lib/ecdsa/ecdsa-libcrypto.c +++ b/lib/ecdsa/ecdsa-libcrypto.c @@ -301,7 +301,7 @@ static int do_add(struct signer *ctx, void *fdt, const char *key_node_name) if (ret < 0) return ret; - return 0; + return key_node; } int ecdsa_add_verify_data(struct image_sign_info *info, void *fdt) @@ -313,7 +313,7 @@ int ecdsa_add_verify_data(struct image_sign_info *info, void *fdt) fdt_key_name = info->keyname ? info->keyname : "default-key"; ret = prepare_ctx(&ctx, info); if (ret >= 0) - do_add(&ctx, fdt, fdt_key_name); + ret = do_add(&ctx, fdt, fdt_key_name); free_ctx(&ctx); return ret; diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index a95a3d2748a..3e7b7982890 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -703,5 +703,8 @@ err_get_pub_key: if (info->engine_id) rsa_engine_remove(e); - return ret; + if (ret) + return ret; + + return node; } |