1 /*
2  * Copyright 2015 The Chromium OS Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6 
7 #ifndef __TPM2_TICKET_FP_H
8 #define __TPM2_TICKET_FP_H
9 
10 void TicketComputeAuth(
11     TPM_ST type,                  //   IN: the type of ticket.
12     TPMI_RH_HIERARCHY hierarchy,  //   IN: hierarchy constant for ticket
13     UINT64 timeout,               //   IN: timeout
14     TPM2B_DIGEST *cpHashA,        //   IN: input cpHashA
15     TPM2B_NONCE *policyRef,       //   IN: input policyRef
16     TPM2B_NAME *entityName,       //   IN: name of entity
17     TPMT_TK_AUTH *ticket          //   OUT: Created ticket
18     );
19 void TicketComputeCreation(
20     TPMI_RH_HIERARCHY hierarchy,  //   IN: hierarchy for ticket
21     TPM2B_NAME *name,             //   IN: object name
22     TPM2B_DIGEST *creation,       //   IN: creation hash
23     TPMT_TK_CREATION *ticket      //   OUT: created ticket
24     );
25 void TicketComputeHashCheck(
26     TPMI_RH_HIERARCHY hierarchy,  //   IN: hierarchy constant for ticket
27     TPM_ALG_ID hashAlg,    //   IN: the hash algorithm used to create 'digest'
28     TPM2B_DIGEST *digest,  //   IN: input digest
29     TPMT_TK_HASHCHECK *ticket  //   OUT: Created ticket
30     );
31 void TicketComputeVerified(
32     TPMI_RH_HIERARCHY hierarchy,  //   IN: hierarchy constant for ticket
33     TPM2B_DIGEST *digest,         //   IN: digest
34     TPM2B_NAME *keyName,          //   IN: name of key that signed the value
35     TPMT_TK_VERIFIED *ticket      //   OUT: verified ticket
36     );
37 BOOL TicketIsSafe(TPM2B *buffer);
38 
39 #endif  // __TPM2_TICKET_FP_H
40