]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tpm: Add a constant for the minimum supported digest size
authorSimon Glass <sjg@chromium.org>
Sun, 18 Nov 2018 21:22:25 +0000 (14:22 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 29 Nov 2018 16:30:06 +0000 (09:30 -0700)
When SHA1 is used we need 20 bytes for the digest size. Add a constant so
that clients can make use of this, e.g. to allocate local buffers.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/tpm-common.h

index 5f8bc6bc5287189d48ee1829d60fd5a9be4c4bc4..449ad4c96e1dbd8caf69110a1b89b0c8e13c0913 100644 (file)
@@ -26,6 +26,8 @@ enum tpm_duration {
 /* Max buffer size supported by our tpm */
 #define TPM_DEV_BUFSIZE                1260
 
+#define TPM_PCR_MINIMUM_DIGEST_SIZE 20
+
 /**
  * enum tpm_version - The version of the TPM stack to be used
  * @TPM_V1:            Use TPM v1.x stack