diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-08-17 17:30:29 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2022-08-19 20:12:49 +0100 |
commit | 98193c39c6d7f5cd6d79fc59ecbeca7ef96d563f (patch) | |
tree | 9e8f323cf3bda837767f00616137916974c88a27 /src/shared/tpm2-util.h | |
parent | df6c3cbd02b60315ccce011afb060f3aeba2d58f (diff) | |
download | systemd-98193c39c6d7f5cd6d79fc59ecbeca7ef96d563f.tar.gz |
tpm2-util: expose more hash algorithms
swtpm supports them, hence maybe support them in our codebase, too
Diffstat (limited to 'src/shared/tpm2-util.h')
-rw-r--r-- | src/shared/tpm2-util.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/shared/tpm2-util.h b/src/shared/tpm2-util.h index ed6a5d1ca2..220eb341ec 100644 --- a/src/shared/tpm2-util.h +++ b/src/shared/tpm2-util.h @@ -67,12 +67,20 @@ static inline bool TPM2_PCR_MASK_VALID(uint64_t pcr_mask) { /* We want the helpers below to work also if TPM2 libs are not available, hence define these four defines if * they are missing. */ +#ifndef TPM2_ALG_SHA1 +#define TPM2_ALG_SHA1 0x4 +#endif + #ifndef TPM2_ALG_SHA256 #define TPM2_ALG_SHA256 0xB #endif -#ifndef TPM2_ALG_SHA1 -#define TPM2_ALG_SHA1 0x4 +#ifndef TPM2_ALG_SHA384 +#define TPM2_ALG_SHA384 0xC +#endif + +#ifndef TPM2_ALG_SHA512 +#define TPM2_ALG_SHA512 0xD #endif #ifndef TPM2_ALG_ECC |