Inheritance: TpmStructureBase
Example #1
0
 public void PolicyTicket(
     TpmHandle policySession,
     byte[] timeout,
     byte[] cpHashA,
     byte[] policyRef,
     byte[] authName,
     TkAuth ticket
 )
 {
     Tpm2PolicyTicketRequest inS = new Tpm2PolicyTicketRequest();
     inS.policySession = policySession;
     inS.timeout = timeout;
     inS.cpHashA = cpHashA;
     inS.policyRef = policyRef;
     inS.authName = authName;
     inS.ticket = ticket;
     TpmStructureBase outSBase;
     DispatchMethod(TpmCc.PolicyTicket, (TpmStructureBase) inS, typeof(Tpm2PolicyTicketResponse), out outSBase, 1, 0);
 }
Example #2
0
 public TkAuth(TkAuth the_TkAuth)
 {
     if((Object) the_TkAuth == null ) throw new ArgumentException(Globs.GetResourceString("parmError"));
     tag = the_TkAuth.tag;
     hierarchy = the_TkAuth.hierarchy;
     digest = the_TkAuth.digest;
 }
Example #3
0
 public Tpm2PolicyTicketRequest(Tpm2PolicyTicketRequest the_Tpm2PolicyTicketRequest)
 {
     if((Object) the_Tpm2PolicyTicketRequest == null ) throw new ArgumentException(Globs.GetResourceString("parmError"));
     policySession = the_Tpm2PolicyTicketRequest.policySession;
     timeout = the_Tpm2PolicyTicketRequest.timeout;
     cpHashA = the_Tpm2PolicyTicketRequest.cpHashA;
     policyRef = the_Tpm2PolicyTicketRequest.policyRef;
     authName = the_Tpm2PolicyTicketRequest.authName;
     ticket = the_Tpm2PolicyTicketRequest.ticket;
 }
Example #4
0
 ///<param name = "the_policySession">handle for the policy session being extended Auth Index: None</param>
 ///<param name = "the_timeout">time when authorization will expire The contents are TPM specific. This shall be the value returned when ticket was produced.</param>
 ///<param name = "the_cpHashA">digest of the command parameters to which this authorization is limited If it is not limited, the parameter will be the Empty Buffer.</param>
 ///<param name = "the_policyRef">reference to a qualifier for the policy  may be the Empty Buffer</param>
 ///<param name = "the_authName">name of the object that provided the authorization</param>
 ///<param name = "the_ticket">an authorization ticket returned by the TPM in response to a TPM2_PolicySigned() or TPM2_PolicySecret()</param>
 public Tpm2PolicyTicketRequest(
 TpmHandle the_policySession,
 byte[] the_timeout,
 byte[] the_cpHashA,
 byte[] the_policyRef,
 byte[] the_authName,
 TkAuth the_ticket
 )
 {
     this.policySession = the_policySession;
     this.timeout = the_timeout;
     this.cpHashA = the_cpHashA;
     this.policyRef = the_policyRef;
     this.authName = the_authName;
     this.ticket = the_ticket;
 }
Example #5
0
 ///<param name = "the_timeout">implementation-specific time value used to indicate to the TPM when the ticket expires; this ticket will use the TPMT_ST_AUTH_SECRET structure tag</param>
 ///<param name = "the_policyTicket">produced if the command succeeds and expiration in the command was non-zero. See 23.2.5</param>
 public Tpm2PolicySecretResponse(
 byte[] the_timeout,
 TkAuth the_policyTicket
 )
 {
     this.timeout = the_timeout;
     this.policyTicket = the_policyTicket;
 }
Example #6
0
 public Tpm2PolicyTicketRequest()
 {
     policySession = new TpmHandle();
     timeout = new byte[0];
     cpHashA = new byte[0];
     policyRef = new byte[0];
     authName = new byte[0];
     ticket = new TkAuth();
 }
Example #7
0
 public Tpm2PolicySecretResponse(Tpm2PolicySecretResponse the_Tpm2PolicySecretResponse)
 {
     if((Object) the_Tpm2PolicySecretResponse == null ) throw new ArgumentException(Globs.GetResourceString("parmError"));
     timeout = the_Tpm2PolicySecretResponse.timeout;
     policyTicket = the_Tpm2PolicySecretResponse.policyTicket;
 }
Example #8
0
 public Tpm2PolicySecretResponse()
 {
     timeout = new byte[0];
     policyTicket = new TkAuth();
 }
Example #9
0
 public void SetTicket(TkAuth ticket)
 {
     Ticket = ticket;
 }
Example #10
0
 /// <summary>
 /// This command is similar to TPM2_PolicySigned() except that it takes a 
 /// ticket instead of a signed authorization. The ticket represents a 
 /// validated authorization that had an expiration time associated with it.
 /// </summary>
 public TpmPolicyTicket(
     TkAuth ticket,
     byte[] expirationTimeFromSignOperation,
     byte[] cpHash,
     byte[] policyRef,
     byte[] objectName,
     string branchName = "") : base(branchName)
 {
     Ticket = ticket;
     ExpirationTime = Globs.CopyData(expirationTimeFromSignOperation);
     CpHash = Globs.CopyData(cpHash);
     PolicyRef = Globs.CopyData(policyRef);
     ObjectName = Globs.CopyData(objectName);
     TicketType = ticket.tag;
 }
Example #11
0
 public Tpm2PolicySignedResponse()
 {
     timeout = null;
     policyTicket = new TkAuth();
 }