1 // Copyright 2015 The Chromium OS Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // THIS CODE IS GENERATED - DO NOT MODIFY! 6 7 #ifndef TPM2_POLICYSIGNED_FP_H_ 8 #define TPM2_POLICYSIGNED_FP_H_ 9 10 #include "tpm_generated.h" 11 12 typedef struct { 13 TPMI_DH_OBJECT authObject; 14 TPMI_SH_POLICY policySession; 15 TPM2B_NONCE nonceTPM; 16 TPM2B_DIGEST cpHashA; 17 TPM2B_NONCE policyRef; 18 INT32 expiration; 19 TPMT_SIGNATURE auth; 20 } PolicySigned_In; 21 22 typedef struct { 23 TPM2B_TIMEOUT timeout; 24 TPMT_TK_AUTH policyTicket; 25 } PolicySigned_Out; 26 27 // Executes PolicySigned with request handles and parameters from 28 // |in| and computes response handles and parameters to |out|. 29 TPM_RC TPM2_PolicySigned(PolicySigned_In* in, PolicySigned_Out* out); 30 31 // Initializes handle fields in |target| from |request_handles|. Unmarshals 32 // parameter fields in |target| from |buffer|. 33 TPM_RC PolicySigned_In_Unmarshal(PolicySigned_In* target, 34 TPM_HANDLE request_handles[], 35 BYTE** buffer, 36 INT32* size); 37 38 // Marshals response handles and parameters from |source| to |buffer|. Computes 39 // and marshals the size of the parameter area (parameter_size) if |tag| == 40 // TPM_ST_SESSIONS. Returns size of (parameter area + handle area) in bytes. 41 // Return value does not include parameter_size field. 42 UINT16 PolicySigned_Out_Marshal(PolicySigned_Out* source, 43 TPMI_ST_COMMAND_TAG tag, 44 BYTE** buffer, 45 INT32* size); 46 47 // Unmarshals any request parameters starting at |request_parameter_buffer|. 48 // Executes command. Marshals any response handles and parameters to the 49 // global response buffer and computes |*response_handle_buffer_size| and 50 // |*response_parameter_buffer_size|. If |tag| == TPM_ST_SESSIONS, marshals 51 // parameter_size indicating the size of the parameter area. parameter_size 52 // field is located between the handle area and parameter area. 53 TPM_RC Exec_PolicySigned(TPMI_ST_COMMAND_TAG tag, 54 BYTE** request_parameter_buffer, 55 INT32* request_parameter_buffer_size, 56 TPM_HANDLE request_handles[], 57 UINT32* response_handle_buffer_size, 58 UINT32* response_parameter_buffer_size); 59 60 #endif // TPM2_POLICYSIGNED_FP_H 61