| // This file was extracted from the TCG Published |
| // Trusted Platform Module Library |
| // Level 00 Revision 01.16 |
| #include "InternalRoutines.h" |
| #include "PolicyAuthValue_fp.h" |
| #include "Policy_spt_fp.h" |
| PolicyAuthValue_In *in // IN: input parameter list |
| TPM_CC commandCode = TPM_CC_PolicyAuthValue; |
| // Get pointer to the session structure |
| session = SessionGet(in->policySession); |
| // policyDigestnew = hash(policyDigestold || TPM_CC_PolicyAuthValue) |
| CryptStartHash(session->authHashAlg, &hashState); |
| CryptUpdateDigest2B(&hashState, &session->u2.policyDigest.b); |
| CryptUpdateDigestInt(&hashState, sizeof(TPM_CC), &commandCode); |
| // complete the hash and get the results |
| CryptCompleteHash2B(&hashState, &session->u2.policyDigest.b); |
| // update isAuthValueNeeded bit in the session context |
| session->attributes.isAuthValueNeeded = SET; |
| session->attributes.isPasswordNeeded = CLEAR; |