summaryrefslogtreecommitdiff
path: root/src/security/tpm/tss/tcg-2.0/tss_marshaling.c
diff options
context:
space:
mode:
authorSergii Dmytruk <sergii.dmytruk@3mdeb.com>2022-10-31 18:41:52 +0200
committerMartin L Roth <gaumless@gmail.com>2024-03-28 15:16:19 +0000
commit094a051732341d20e82c349ea10f85faea6e58d1 (patch)
treea6da34deaf0607885577218e0fb950f1bec18034 /src/security/tpm/tss/tcg-2.0/tss_marshaling.c
parentfebf9b9f24f537b88ea5d4845a8d350d94d9e295 (diff)
security/tpm: resolve conflicts in TSS implementations
No functional changes. Refactor code such that there won't be any compiler or linker errors if TSS 1.2 and TSS 2.0 were both compiled in. One might want to support both TPM families for example if TPM is pluggable, while currently one has to reflash firmware along with switching TPM device. Change-Id: Ia0ea5a917c46ada9fc3274f17240e12bca98db6a Ticket: https://ticket.coreboot.org/issues/433 Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69160 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/security/tpm/tss/tcg-2.0/tss_marshaling.c')
-rw-r--r--src/security/tpm/tss/tcg-2.0/tss_marshaling.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c
index 5ade6395bb..3039a8b8ba 100644
--- a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c
+++ b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c
@@ -79,23 +79,23 @@ static int marshal_TPMT_HA(struct obuf *ob, const TPMT_HA *tpmtha)
switch (tpmtha->hashAlg) {
case TPM_ALG_SHA1:
rc |= obuf_write(ob, tpmtha->digest.sha1,
- tlcl_get_hash_size_from_algo(tpmtha->hashAlg));
+ tlcl2_get_hash_size_from_algo(tpmtha->hashAlg));
break;
case TPM_ALG_SHA256:
rc |= obuf_write(ob, tpmtha->digest.sha256,
- tlcl_get_hash_size_from_algo(tpmtha->hashAlg));
+ tlcl2_get_hash_size_from_algo(tpmtha->hashAlg));
break;
case TPM_ALG_SM3_256:
rc |= obuf_write(ob, tpmtha->digest.sm3_256,
- tlcl_get_hash_size_from_algo(tpmtha->hashAlg));
+ tlcl2_get_hash_size_from_algo(tpmtha->hashAlg));
break;
case TPM_ALG_SHA384:
rc |= obuf_write(ob, tpmtha->digest.sha384,
- tlcl_get_hash_size_from_algo(tpmtha->hashAlg));
+ tlcl2_get_hash_size_from_algo(tpmtha->hashAlg));
break;
case TPM_ALG_SHA512:
rc |= obuf_write(ob, tpmtha->digest.sha512,
- tlcl_get_hash_size_from_algo(tpmtha->hashAlg));
+ tlcl2_get_hash_size_from_algo(tpmtha->hashAlg));
break;
default:
rc = -1;