PolicyTicket_fp.h revision a4ed3aa64664a1241ea982d685db744caaae3ffa
1a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// Copyright 2015 The Chromium OS Authors. All rights reserved.
2a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// Use of this source code is governed by a BSD-style license that can be
3a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// found in the LICENSE file.
4950c1a546a4891d79ea2974e8e6a5d2d02aebf9bVadim Bendebury
5a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// THIS CODE IS GENERATED - DO NOT MODIFY!
6a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr
7a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr#ifndef TPM2_POLICYTICKET_FP_H
8a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr#define TPM2_POLICYTICKET_FP_H
9a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr
10a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr#include "tpm_generated.h"
11950c1a546a4891d79ea2974e8e6a5d2d02aebf9bVadim Bendebury
12950c1a546a4891d79ea2974e8e6a5d2d02aebf9bVadim Bendeburytypedef struct {
13a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr  TPMI_SH_POLICY policySession;
14a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr  TPM2B_TIMEOUT timeout;
15f788ffb5e5b4493cb4c1deaa12a97c80c2694b01Vadim Bendebury  TPM2B_DIGEST cpHashA;
16f788ffb5e5b4493cb4c1deaa12a97c80c2694b01Vadim Bendebury  TPM2B_NONCE policyRef;
17f788ffb5e5b4493cb4c1deaa12a97c80c2694b01Vadim Bendebury  TPM2B_NAME authName;
18a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr  TPMT_TK_AUTH ticket;
19950c1a546a4891d79ea2974e8e6a5d2d02aebf9bVadim Bendebury} PolicyTicket_In;
20950c1a546a4891d79ea2974e8e6a5d2d02aebf9bVadim Bendebury
21a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// Executes PolicyTicket with request handles and parameters from |in|.
22a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn BohrTPM_RC TPM2_PolicyTicket(PolicyTicket_In* in);
23a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr
24a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// Initializes handle fields in |target| from |req_handles|. Unmarshals
25a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// parameter fields in |target| from |buffer|.
26a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn BohrTPM_RC PolicyTicket_In_Unmarshal(PolicyTicket_In* target,
27a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr                                 TPM_HANDLE req_handles[],
28a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr                                 BYTE** buffer,
29a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr                                 INT32* size);
30a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr
31a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// Unmarshals any request parameters starting at |req_parameter_buffer|.
32a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// Executes command. Marshals any response handles and parameters to the
33a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// global response buffer and computes |*res_handle_buffer_size| and
34a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// |*res_parameter_buffer_size|. If |tag| == TPM_ST_SESSIONS, marshals
35a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// parameter_size indicating the size of the parameter area. parameter_size
36a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr// field is located between the handle area and parameter area.
37a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn BohrTPM_RC Exec_PolicyTicket(TPMI_ST_COMMAND_TAG tag,
38a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr                         BYTE** req_parameter_buffer,
39a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr                         INT32* req_parameter_buffer_size,
40a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr                         TPM_HANDLE req_handles[],
41a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr                         UINT32* res_handle_buffer_size,
42a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr                         UINT32* res_parameter_buffer_size);
43950c1a546a4891d79ea2974e8e6a5d2d02aebf9bVadim Bendebury
44a4ed3aa64664a1241ea982d685db744caaae3ffaJocelyn Bohr#endif  // TPM2_POLICYTICKET_FP_H
45