public TpmPolicyTicket(TkAuth ticket, byte[] expirationTimeFromSignOperation, byte[] cpHash, byte[] policyRef, byte[] objectName, string branchName = "", string nodeId = null) : base(branchName, nodeId) { Ticket = ticket; ExpirationTime = Globs.CopyData(expirationTimeFromSignOperation); CpHash = Globs.CopyData(cpHash); PolicyRef = Globs.CopyData(policyRef); ObjectName = Globs.CopyData(objectName); TicketType = ticket.tag; }
/// <summary> /// Returns the ticket associated with a prior policy execution (or null). /// </summary> /// <param name="nodeIdentifier"></param> /// <returns></returns> public TkAuth GetTicket(string nodeIdentifier) { MatchingNode = null; PolicyAce matchingAce = GetNodeIdInternal(PolicyRoot, nodeIdentifier); if (matchingAce == null) { return(null); } TkAuth tic = ((TpmPolicySigned)matchingAce).GetPolicyTicket(); return(tic); }
public void SetTicket(TkAuth ticket) { Ticket = ticket; }