Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions PCPTool.v11/dll/AttestationApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ TpmAttiComputeSoftPCRs(
goto Cleanup;
}

if (FAILED(hr = WbclApiInitIterator(pbEventLog,
if (FAILED(hr = WbclApiInitIteratorInternal(pbEventLog,
cbEventLog,
&wbclIterator)))
{
Expand Down Expand Up @@ -453,9 +453,9 @@ TpmAttiComputeSoftPCRs(
}

for (; hr == S_OK;
hr = WbclApiMoveToNextElement(&wbclIterator))
hr = WbclApiMoveToNextElementInternal(&wbclIterator))
{
hr = WbclApiGetCurrentElement(
hr = WbclApiGetCurrentElementInternal(
&wbclIterator,
&PcrIndex,
&EventType,
Expand Down Expand Up @@ -632,7 +632,7 @@ TpmAttiFilterLog(
// Make OACR happy
*pcbResult = 0;

if (FAILED(hr = WbclApiInitIterator(pbEventLog,
if (FAILED(hr = WbclApiInitIteratorInternal(pbEventLog,
cbEventLog,
&wbclIterator)))
{
Expand All @@ -650,9 +650,9 @@ TpmAttiFilterLog(

// 1st pass to find out how much space we will need
for (; hr == S_OK;
hr = WbclApiMoveToNextElement(&wbclIterator))
hr = WbclApiMoveToNextElementInternal(&wbclIterator))
{
hr = WbclApiGetCurrentElement(
hr = WbclApiGetCurrentElementInternal(
&wbclIterator,
&pcrIndex,
&eventType,
Expand Down Expand Up @@ -694,7 +694,7 @@ TpmAttiFilterLog(
goto Cleanup;
}

if (FAILED(hr = WbclApiInitIterator(pbEventLog,
if (FAILED(hr = WbclApiInitIteratorInternal(pbEventLog,
cbEventLog,
&wbclIterator)))
{
Expand Down Expand Up @@ -723,9 +723,9 @@ TpmAttiFilterLog(

// 2nd pass to copy the entries
for (; hr == S_OK;
hr = WbclApiMoveToNextElement(&wbclIterator))
hr = WbclApiMoveToNextElementInternal(&wbclIterator))
{
hr = WbclApiGetCurrentElement(
hr = WbclApiGetCurrentElementInternal(
&wbclIterator,
&pcrIndex,
&eventType,
Expand Down Expand Up @@ -1119,7 +1119,7 @@ TpmAttGeneratePlatformAttestation(
goto Cleanup;
}

if (FAILED(hr = WbclApiInitIterator(pbLog, cbLog, &wbclIterator)))
if (FAILED(hr = WbclApiInitIteratorInternal(pbLog, cbLog, &wbclIterator)))
{
goto Cleanup;
}
Expand Down Expand Up @@ -2039,7 +2039,7 @@ TpmAttCreateAttestationfromLog(
goto Cleanup;
}

if (FAILED(hr = WbclApiInitIterator(pbLog,
if (FAILED(hr = WbclApiInitIteratorInternal(pbLog,
cbLog,
&wbclIterator)))
{
Expand All @@ -2048,9 +2048,9 @@ TpmAttCreateAttestationfromLog(

// parse the log
for (; hr == S_OK;
hr = WbclApiMoveToNextElement(&wbclIterator))
hr = WbclApiMoveToNextElementInternal(&wbclIterator))
{
hr = WbclApiGetCurrentElement(
hr = WbclApiGetCurrentElementInternal(
&wbclIterator,
&pcrIndex,
&eventType,
Expand Down Expand Up @@ -2399,7 +2399,7 @@ TpmAttGetPlatformAttestationProperties(
pAttestation->cbSignature];
cbPlatformLog = pAttestation->cbLog;

if (FAILED(hr = WbclApiInitIterator(pbPlatformLog,
if (FAILED(hr = WbclApiInitIteratorInternal(pbPlatformLog,
cbPlatformLog,
&wbclIterator)))
{
Expand All @@ -2417,9 +2417,9 @@ TpmAttGetPlatformAttestationProperties(

// 2nd pass to copy the entries
for (; hr == S_OK;
hr = WbclApiMoveToNextElement(&wbclIterator))
hr = WbclApiMoveToNextElementInternal(&wbclIterator))
{
hr = WbclApiGetCurrentElement(
hr = WbclApiGetCurrentElementInternal(
&wbclIterator,
&pcrIndex,
&eventType,
Expand Down
10 changes: 5 additions & 5 deletions PCPTool.v11/dll/PCPWbcl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ Return value:
//

HRESULT
WbclApiInitIterator(
WbclApiInitIteratorInternal(
_In_bytecount_(logSize) PVOID pLogBuffer,
_In_ UINT32 logSize,
_Out_ WBCL_Iterator* pWbclIterator
Expand Down Expand Up @@ -589,7 +589,7 @@ Return value:
//
// Extract information for the first event in the log.
//
hr = WbclApiGetCurrentElement(pWbclIterator,
hr = WbclApiGetCurrentElementInternal(pWbclIterator,
&pcrIndex,
&eventType,
NULL,
Expand Down Expand Up @@ -696,7 +696,7 @@ Return value:
// Move to the first log entry after the descriptor.
// WbclApiMoveToNextElement() does boundary checks.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the reference in this comment need to change as well?
It could be confusing to leave a call that is similar but not the same.

//
hr = WbclApiMoveToNextElement(pWbclIterator);
hr = WbclApiMoveToNextElementInternal(pWbclIterator);
if (hr != S_OK)
{
hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA);
Expand All @@ -710,7 +710,7 @@ Return value:
}

HRESULT
WbclApiGetCurrentElement(
WbclApiGetCurrentElementInternal(
_In_ WBCL_Iterator* pWbclIterator,
_Out_ UINT32* pcrIndex,
_Out_ UINT32* eventType,
Expand Down Expand Up @@ -787,7 +787,7 @@ Return value:
}

HRESULT
WbclApiMoveToNextElement(
WbclApiMoveToNextElementInternal(
_In_ WBCL_Iterator* pWbclIterator)
/*++

Expand Down
9 changes: 5 additions & 4 deletions PCPTool.v11/dll/dll.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -103,6 +103,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessToFile>false</PreprocessToFile>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
6 changes: 3 additions & 3 deletions PCPTool.v11/exe/Support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ PcpToolDisplayLog(
PcpToolLevelPrefix(level + 1);
wprintf(L"<WBCL size=\"%u\">\n", cbWBCL);

if (FAILED(hr = WbclApiInitIterator(pbWBCL,
if (FAILED(hr = WbclApiInitIteratorInternal(pbWBCL,
cbWBCL,
&wbclIterator)))
{
Expand All @@ -862,7 +862,7 @@ PcpToolDisplayLog(
}

for (; hr == S_OK;
hr = WbclApiMoveToNextElement(&wbclIterator))
hr = WbclApiMoveToNextElementInternal(&wbclIterator))
{
BYTE eventDataDigest[MAX_DIGEST_SIZE] = { 0 };
UINT32 PcrIndex;
Expand All @@ -871,7 +871,7 @@ PcpToolDisplayLog(
PBYTE pbEventData;
PBYTE pbDigest;

hr = WbclApiGetCurrentElement(
hr = WbclApiGetCurrentElementInternal(
&wbclIterator,
&PcrIndex,
&EventType,
Expand Down
8 changes: 4 additions & 4 deletions PCPTool.v11/exe/exe.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
Loading