Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
 public void SetTicket(TkAuth ticket)
 {
     Ticket = ticket;
 }