internal override TpmHash GetPolicyDigest(TpmAlgId hashAlg) { var m = new Marshaller(); m.Put(TpmCc.PolicyPCR, "ordinal"); m.Put(Pcrs.GetTpmlPcrSelection(), "selection"); m.Put(Pcrs.GetSelectionHash(hashAlg).HashData, "pcrs"); return(GetNextAcePolicyDigest(hashAlg).Extend(m.GetBytes())); }
internal override TpmRc Execute(Tpm2 tpm, AuthSession sess, PolicyTree policy) { tpm.PolicyPCR(sess, Pcrs.GetSelectionHash(policy.PolicyHash), Pcrs.GetPcrSelectionArray()); return(tpm._GetLastResponseCode()); }