summaryrefslogtreecommitdiff
path: root/src/security/tpm/tspi
diff options
context:
space:
mode:
Diffstat (limited to 'src/security/tpm/tspi')
-rw-r--r--src/security/tpm/tspi/tspi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/security/tpm/tspi/tspi.c b/src/security/tpm/tspi/tspi.c
index 4cf371196e..e64e04fbbe 100644
--- a/src/security/tpm/tspi/tspi.c
+++ b/src/security/tpm/tspi/tspi.c
@@ -219,12 +219,12 @@ uint32_t tpm_extend_pcr(int pcr, enum vb2_hash_algorithm digest_algo,
case VB2_HASH_SHA1:
tpml_digests.digests[0].hashAlg = TPM_ALG_SHA1;
memcpy(tpml_digests.digests[0].digest.sha1,
- digest, sizeof(TPMU_HA));
+ digest, SHA1_DIGEST_SIZE);
break;
case VB2_HASH_SHA256:
tpml_digests.digests[0].hashAlg = TPM_ALG_SHA256;
memcpy(tpml_digests.digests[0].digest.sha256,
- digest, sizeof(TPMU_HA));
+ digest, SHA256_DIGEST_SIZE);
break;
default:
return TPM_E_IOERROR;