From e6a886fdfc83503628a816d09c6e6a2a3d2ed88c Mon Sep 17 00:00:00 2001 From: Michael D Kinney Date: Sat, 27 May 2023 18:12:14 -0700 Subject: SecurityPkg/Library/TpmCommandLib: Change xor to xor_ Change xor to xor_ to avoid C++ reserved work name collisions when building with C++ compilers. Signed-off-by: Michael D Kinney --- SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 6 +++--- SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c | 12 ++++++------ SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'SecurityPkg') diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c index f0e6019a47..3dd5f2edd9 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c @@ -734,9 +734,9 @@ Tpm2TestParms ( Buffer += sizeof (UINT16); break; case TPM_ALG_XOR: - WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->parameters.keyedHashDetail.scheme.details.xor.hashAlg)); + WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->parameters.keyedHashDetail.scheme.details.xor_.hashAlg)); Buffer += sizeof (UINT16); - WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->parameters.keyedHashDetail.scheme.details.xor.kdf)); + WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->parameters.keyedHashDetail.scheme.details.xor_.kdf)); Buffer += sizeof (UINT16); break; default: @@ -761,7 +761,7 @@ Tpm2TestParms ( Buffer += sizeof (UINT16); break; case TPM_ALG_XOR: - WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->parameters.symDetail.keyBits.xor)); + WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->parameters.symDetail.keyBits.xor_)); Buffer += sizeof (UINT16); break; case TPM_ALG_NULL: diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c index 3aaf012d7e..9887c32311 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c @@ -169,10 +169,10 @@ Tpm2ReadPublic ( Buffer += sizeof (UINT16); break; case TPM_ALG_XOR: - OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.xor.hashAlg = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); - Buffer += sizeof (UINT16); - OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.xor.kdf = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); - Buffer += sizeof (UINT16); + OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.xor_.hashAlg = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); + Buffer += sizeof (UINT16); + OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.xor_.kdf = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); + Buffer += sizeof (UINT16); break; default: return EFI_UNSUPPORTED; @@ -196,8 +196,8 @@ Tpm2ReadPublic ( Buffer += sizeof (UINT16); break; case TPM_ALG_XOR: - OutPublic->publicArea.parameters.symDetail.keyBits.xor = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); - Buffer += sizeof (UINT16); + OutPublic->publicArea.parameters.symDetail.keyBits.xor_ = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); + Buffer += sizeof (UINT16); break; case TPM_ALG_NULL: break; diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c index 7f247da301..9ea18bbdd2 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c @@ -119,7 +119,7 @@ Tpm2StartAuthSession ( Buffer += sizeof (UINT16); break; case TPM_ALG_XOR: - WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Symmetric->keyBits.xor)); + WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Symmetric->keyBits.xor_)); Buffer += sizeof (UINT16); break; default: -- cgit