aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMathew McBride2021-11-11 04:06:27 +0000
committerIlias Apalodimas2021-11-17 13:47:27 +0200
commite845dd7c8ba8fcab504c813da0eea59550bc7b05 (patch)
treefea74e0a5bea6e3fc7844b3f3182476882f27b95 /cmd
parentebb6d74df3a33f8f65febfdf14f131197949cc46 (diff)
cmd: tpm-v1: fix load_key_by_sha1 compile errors
This command is not compiled by default and has not been updated alongside changes to the tpmv1 API, such as passing the TPM udevice to the relevant functions. Signed-off-by: Mathew McBride <matt@traverse.com.au> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/tpm-v1.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/tpm-v1.c b/cmd/tpm-v1.c
index 55f2aeff469..bf238a9f2e3 100644
--- a/cmd/tpm-v1.c
+++ b/cmd/tpm-v1.c
@@ -406,9 +406,9 @@ static int do_tpm_load_key_by_sha1(struct cmd_tbl *cmdtp, int flag, int argc,
void *key;
struct udevice *dev;
- rc = get_tpm(&dev);
- if (rc)
- return rc;
+ err = get_tpm(&dev);
+ if (err)
+ return err;
if (argc < 5)
return CMD_RET_USAGE;
@@ -420,7 +420,7 @@ static int do_tpm_load_key_by_sha1(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
parse_byte_string(argv[4], usage_auth, NULL);
- err = tpm_find_key_sha1(usage_auth, parent_hash, &parent_handle);
+ err = tpm1_find_key_sha1(dev, usage_auth, parent_hash, &parent_handle);
if (err) {
printf("Could not find matching parent key (err = %d)\n", err);
return CMD_RET_FAILURE;
@@ -428,7 +428,7 @@ static int do_tpm_load_key_by_sha1(struct cmd_tbl *cmdtp, int flag, int argc,
printf("Found parent key %08x\n", parent_handle);
- err = tpm_load_key2_oiap(parent_handle, key, key_len, usage_auth,
+ err = tpm1_load_key2_oiap(dev, parent_handle, key, key_len, usage_auth,
&key_handle);
if (!err) {
printf("Key handle is 0x%x\n", key_handle);