mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
tpm2: replace magic number in hmac_sensitive initialization
Instead of setting hmac_sensitive.sensitive.data.size to '32' use the actual hash size as set in the hmac_template.
This commit is contained in:
parent
ee6a8713ab
commit
180444b885
@ -2973,7 +2973,7 @@ int tpm2_seal(const char *device,
|
||||
|
||||
TPM2B_SENSITIVE_CREATE hmac_sensitive = {
|
||||
.size = sizeof(hmac_sensitive.sensitive),
|
||||
.sensitive.data.size = 32,
|
||||
.sensitive.data.size = hmac_template.publicArea.unique.keyedHash.size,
|
||||
};
|
||||
|
||||
CLEANUP_ERASE(hmac_sensitive);
|
||||
|
Loading…
Reference in New Issue
Block a user