Jocelyn Bohr | a4ed3aa | 2015-07-30 10:44:16 -0700 | [diff] [blame] | 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. |
Vadim Bendebury | e8a8a1c | 2015-06-01 19:06:32 -0700 | [diff] [blame] | 4 | |
Jocelyn Bohr | a4ed3aa | 2015-07-30 10:44:16 -0700 | [diff] [blame] | 5 | // THIS CODE IS GENERATED - DO NOT MODIFY! |
| 6 | |
Vadim Bendebury | 776e236 | 2015-09-04 16:14:53 -0700 | [diff] [blame] | 7 | #ifndef TPM2_UNSEAL_FP_H_ |
| 8 | #define TPM2_UNSEAL_FP_H_ |
Jocelyn Bohr | a4ed3aa | 2015-07-30 10:44:16 -0700 | [diff] [blame] | 9 | |
| 10 | #include "tpm_generated.h" |
Vadim Bendebury | e8a8a1c | 2015-06-01 19:06:32 -0700 | [diff] [blame] | 11 | |
Vadim Bendebury | f788ffb | 2015-06-05 12:57:27 -0700 | [diff] [blame] | 12 | typedef struct { TPMI_DH_OBJECT itemHandle; } Unseal_In; |
Vadim Bendebury | e8a8a1c | 2015-06-01 19:06:32 -0700 | [diff] [blame] | 13 | |
Jocelyn Bohr | a4ed3aa | 2015-07-30 10:44:16 -0700 | [diff] [blame] | 14 | typedef struct { TPM2B_SENSITIVE_DATA outData; } Unseal_Out; |
Vadim Bendebury | e8a8a1c | 2015-06-01 19:06:32 -0700 | [diff] [blame] | 15 | |
Jocelyn Bohr | a4ed3aa | 2015-07-30 10:44:16 -0700 | [diff] [blame] | 16 | // Executes Unseal with request handles and parameters from |
| 17 | // |in| and computes response handles and parameters to |out|. |
| 18 | TPM_RC TPM2_Unseal(Unseal_In* in, Unseal_Out* out); |
Vadim Bendebury | e8a8a1c | 2015-06-01 19:06:32 -0700 | [diff] [blame] | 19 | |
Vadim Bendebury | 776e236 | 2015-09-04 16:14:53 -0700 | [diff] [blame] | 20 | // Initializes handle fields in |target| from |request_handles|. Unmarshals |
Jocelyn Bohr | a4ed3aa | 2015-07-30 10:44:16 -0700 | [diff] [blame] | 21 | // parameter fields in |target| from |buffer|. |
| 22 | TPM_RC Unseal_In_Unmarshal(Unseal_In* target, |
Vadim Bendebury | 776e236 | 2015-09-04 16:14:53 -0700 | [diff] [blame] | 23 | TPM_HANDLE request_handles[], |
Jocelyn Bohr | a4ed3aa | 2015-07-30 10:44:16 -0700 | [diff] [blame] | 24 | BYTE** buffer, |
| 25 | INT32* size); |
| 26 | |
| 27 | // Marshals response handles and parameters from |source| to |buffer|. Computes |
| 28 | // and marshals the size of the parameter area (parameter_size) if |tag| == |
| 29 | // TPM_ST_SESSIONS. Returns size of (parameter area + handle area) in bytes. |
Vadim Bendebury | 776e236 | 2015-09-04 16:14:53 -0700 | [diff] [blame] | 30 | // Return value does not include parameter_size field. |
Jocelyn Bohr | a4ed3aa | 2015-07-30 10:44:16 -0700 | [diff] [blame] | 31 | UINT16 Unseal_Out_Marshal(Unseal_Out* source, |
| 32 | TPMI_ST_COMMAND_TAG tag, |
| 33 | BYTE** buffer, |
| 34 | INT32* size); |
| 35 | |
Vadim Bendebury | 776e236 | 2015-09-04 16:14:53 -0700 | [diff] [blame] | 36 | // Unmarshals any request parameters starting at |request_parameter_buffer|. |
Jocelyn Bohr | a4ed3aa | 2015-07-30 10:44:16 -0700 | [diff] [blame] | 37 | // Executes command. Marshals any response handles and parameters to the |
Vadim Bendebury | 776e236 | 2015-09-04 16:14:53 -0700 | [diff] [blame] | 38 | // global response buffer and computes |*response_handle_buffer_size| and |
| 39 | // |*response_parameter_buffer_size|. If |tag| == TPM_ST_SESSIONS, marshals |
Jocelyn Bohr | a4ed3aa | 2015-07-30 10:44:16 -0700 | [diff] [blame] | 40 | // parameter_size indicating the size of the parameter area. parameter_size |
| 41 | // field is located between the handle area and parameter area. |
| 42 | TPM_RC Exec_Unseal(TPMI_ST_COMMAND_TAG tag, |
Vadim Bendebury | 776e236 | 2015-09-04 16:14:53 -0700 | [diff] [blame] | 43 | BYTE** request_parameter_buffer, |
| 44 | INT32* request_parameter_buffer_size, |
| 45 | TPM_HANDLE request_handles[], |
| 46 | UINT32* response_handle_buffer_size, |
| 47 | UINT32* response_parameter_buffer_size); |
Jocelyn Bohr | a4ed3aa | 2015-07-30 10:44:16 -0700 | [diff] [blame] | 48 | |
| 49 | #endif // TPM2_UNSEAL_FP_H |