예제 #1
0
        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()));
        }
예제 #2
0
 internal override TpmRc Execute(Tpm2 tpm, AuthSession sess, PolicyTree policy)
 {
     tpm.PolicyPCR(sess, Pcrs.GetSelectionHash(policy.PolicyHash),
                   Pcrs.GetPcrSelectionArray());
     return(tpm._GetLastResponseCode());
 }