summaryrefslogtreecommitdiff
path: root/include/tpm-common.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-11-18 14:22:25 -0700
committerSimon Glass <sjg@chromium.org>2018-11-29 09:30:06 -0700
commit07e127d85d9f22ac93f1e9da41a985013c4002ed (patch)
tree63c866fd677dc5ad785954b2fafaf34dd3cfcabb /include/tpm-common.h
parent33810b4e7d81810a5245b342dfe6aea95150f895 (diff)
tpm: Add a constant for the minimum supported digest size
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>
Diffstat (limited to 'include/tpm-common.h')
-rw-r--r--include/tpm-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/tpm-common.h b/include/tpm-common.h
index 5f8bc6bc52..449ad4c96e 100644
--- a/include/tpm-common.h
+++ b/include/tpm-common.h
@@ -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