internal override TpmRc Execute(Tpm2 tpm, AuthSession authSession, PolicyTree policy)
{
TpmRc res;
if (AuthorizationHandle == null)
{
TpmHandle nvHandle, authHandle;
SessionBase nvAuth;
AssociatedPolicy.ExecutePolicyNvCallback(this, out authHandle, out nvHandle, out nvAuth);
tpm[nvAuth].PolicyNV(authHandle, nvHandle, authSession,
OperandB, Offset, Operation);
res = tpm._GetLastResponseCode();
if (!(nvAuth is Pwap))
{
tpm.FlushContext(nvAuth);
}
}
else
{
tpm[NvAccessAuth].PolicyNV(AuthorizationHandle, NvIndex, authSession,
OperandB, Offset, Operation);
res = tpm._GetLastResponseCode();
}
return res;
}