From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.2491.1685472809773224682 for ; Tue, 30 May 2023 11:53:30 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=haFwpOTm; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: michael.d.kinney@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685472810; x=1717008810; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cgMoEMEGmHwtuh5S0u+Oz4/G4u9ayBIUVWvlxCpNdA4=; b=haFwpOTmyteVmUuI6gtxiRvdQ0YrHxEvIvw69v6u6T/BkqFZ/a4mhfnZ Ki+cO7Sj428riUwFBQGWs53ccGBzhlce5eCSs1Fa7Hu6NaBAP7SdGD2Iw 0QF+P5g2GMYqj/W6otOm+m3/Trg7Z41/DMnlfsz5zi9kzBIeTcwRMjfZq UIx0ZfTpcC25Q4KH/UsV8UPmaRMdfIsNkeoVMr51Hi89Y4aBYGuCxdYVR /J+tkIIocPc35yDikHJrk5YQUXIGEsUvqvopEZoue7euqpWgk9ccn/omE a09Mu5qq1ccEoZ975vJLICjQWzYOLGtGIJNFxKexowWt+yAsEcucRFqL9 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="352514925" X-IronPort-AV: E=Sophos;i="6.00,205,1681196400"; d="scan'208";a="352514925" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2023 11:53:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="771675336" X-IronPort-AV: E=Sophos;i="6.00,205,1681196400"; d="scan'208";a="771675336" Received: from unknown (HELO mdkinney-mobl.amr.corp.intel.com) ([10.241.111.19]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2023 11:53:29 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Oliver Smith-Denny , Pedro Falcato , Aaron Pop Subject: [Patch v2 2/3] SecurityPkg/Library/TpmCommandLib: Change xor to Xor Date: Tue, 30 May 2023 11:53:21 -0700 Message-Id: <20230530185322.70-3-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.40.1.windows.1 In-Reply-To: <20230530185322.70-1-michael.d.kinney@intel.com> References: <20230530185322.70-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Change xor to Xor to avoid C++ reserved work name collisions when building with C++ compilers. Cc: Jiewen Yao Cc: Jian J Wang Cc: Oliver Smith-Denny Cc: Pedro Falcato Cc: Aaron Pop Signed-off-by: Michael D Kinney --- SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 6 +++--- SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c | 6 +++--- SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c index f0e6019a47be..f8c781a445a1 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 335957d6cedc..578a61b20339 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c @@ -169,9 +169,9 @@ Tpm2ReadPublic ( Buffer += sizeof (UINT16); break; case TPM_ALG_XOR: - OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.xor.hashAlg = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); + 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)); + OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.Xor.kdf = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); Buffer += sizeof (UINT16); break; default: @@ -195,7 +195,7 @@ Tpm2ReadPublic ( Buffer += sizeof (UINT16); break; case TPM_ALG_XOR: - OutPublic->publicArea.parameters.symDetail.keyBits.xor = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); + OutPublic->publicArea.parameters.symDetail.keyBits.Xor = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer)); Buffer += sizeof (UINT16); break; case TPM_ALG_NULL: diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c index 7f247da301fe..e17318b6e6fb 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: -- 2.40.1.windows.1