summaryrefslogtreecommitdiffstats
path: root/include/keys
diff options
context:
space:
mode:
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2016-01-06 16:43:30 +0200
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2016-02-10 04:10:55 +0200
commitf3c82ade7c59303167d56b0be3e0707751fc45e2 (patch)
tree2e6cf81c35cc600e38fd643a0aa51f7f8a60fa6e /include/keys
parente5be990c2fc3c2682ab7cfbc4f0e6c8cdad2b40d (diff)
downloadlinux-f3c82ade7c59303167d56b0be3e0707751fc45e2.tar.gz
linux-f3c82ade7c59303167d56b0be3e0707751fc45e2.tar.bz2
linux-f3c82ade7c59303167d56b0be3e0707751fc45e2.zip
tpm: fix checks for policy digest existence in tpm2_seal_trusted()
In my original patch sealing with policy was done with dynamically allocated buffer that I changed later into an array so the checks in tpm2-cmd.c became invalid. This patch fixes the issue. Fixes: 5beb0c435bdd ("keys, trusted: seal with a TPM2 authorization policy") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Acked-by: Peter Huewe <peterhuewe@gmx.de>
Diffstat (limited to 'include/keys')
-rw-r--r--include/keys/trusted-type.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/keys/trusted-type.h b/include/keys/trusted-type.h
index 42cf2d991bf4..4ea7e55f20b0 100644
--- a/include/keys/trusted-type.h
+++ b/include/keys/trusted-type.h
@@ -38,7 +38,7 @@ struct trusted_key_options {
unsigned char pcrinfo[MAX_PCRINFO_SIZE];
int pcrlock;
uint32_t hash;
- uint32_t digest_len;
+ uint32_t policydigest_len;
unsigned char policydigest[MAX_DIGEST_SIZE];
uint32_t policyhandle;
};