diff options
author | Jakub Jelen <[email protected]> | 2024-07-04 11:57:44 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2024-07-05 05:21:22 +0000 |
commit | cf3cec982d2805e09e3c26548ce806f2ca86632a (patch) | |
tree | 6367147b1af1711fde9fbe7b3c59abec20f37364 /tpm2d/tpm2.c | |
parent | gpgconf: Print the full commit id. (diff) | |
download | gnupg-cf3cec982d2805e09e3c26548ce806f2ca86632a.tar.gz gnupg-cf3cec982d2805e09e3c26548ce806f2ca86632a.zip |
tpm2d: Fix key import.
* tpm2d/tpm2.c (tpm2_import_key): Set the lengths from right
variables.
--
Fixes-commit: d631c8198c254107c0a4e704511fa0f33d3dda5f
GnuPG-bug-id: 7186
Signed-off-by: Jakub Jelen <[email protected]>
Diffstat (limited to 'tpm2d/tpm2.c')
-rw-r--r-- | tpm2d/tpm2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tpm2d/tpm2.c b/tpm2d/tpm2.c index 2a49bf99b..a4677fb98 100644 --- a/tpm2d/tpm2.c +++ b/tpm2d/tpm2.c @@ -923,14 +923,14 @@ tpm2_import_key (ctrl_t ctrl, TSS_CONTEXT *tssc, u16len = 0; TSS_TPM2B_PUBLIC_Marshal (&objectPublic, &u16len, &buffer, &size); - pub_len = len; + pub_len = u16len; size = sizeof (priv); buffer = priv; u16len = 0; TSS_TPM2B_PRIVATE_Marshal ((TPM2B_PRIVATE *)&outPrivate, &u16len, &buffer, &size); - priv_len = len; + priv_len = u16len; *shadow_info = make_tpm2_shadow_info (parent, pub, pub_len, priv, priv_len, shadow_len); |