| // This file was extracted from the TCG Published |
| // Trusted Platform Module Library |
| // Level 00 Revision 01.16 |
| #include "InternalRoutines.h" |
| #include "PolicyPhysicalPresence_fp.h" |
| TPM2_PolicyPhysicalPresence( |
| PolicyPhysicalPresence_In *in // IN: input parameter list |
| TPM_CC commandCode = TPM_CC_PolicyPhysicalPresence; |
| // Get pointer to the session structure |
| session = SessionGet(in->policySession); |
| // policyDigestnew = hash(policyDigestold || TPM_CC_PolicyPhysicalPresence) |
| CryptStartHash(session->authHashAlg, &hashState); |
| CryptUpdateDigest2B(&hashState, &session->u2.policyDigest.b); |
| CryptUpdateDigestInt(&hashState, sizeof(TPM_CC), &commandCode); |
| CryptCompleteHash2B(&hashState, &session->u2.policyDigest.b); |
| // update session attribute |
| session->attributes.isPPRequired = SET; |