blob: b5f76aa66ae7a9113896a418799bcadfda072848 [file] [log] [blame]
Jocelyn Bohra4ed3aa2015-07-30 10:44:16 -07001// 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 Bendebury163cddf2015-06-01 18:46:15 -07004
Jocelyn Bohra4ed3aa2015-07-30 10:44:16 -07005// THIS CODE IS GENERATED - DO NOT MODIFY!
6
Vadim Bendebury776e2362015-09-04 16:14:53 -07007#ifndef TPM2_STARTAUTHSESSION_FP_H_
8#define TPM2_STARTAUTHSESSION_FP_H_
Jocelyn Bohra4ed3aa2015-07-30 10:44:16 -07009
10#include "tpm_generated.h"
Vadim Bendebury163cddf2015-06-01 18:46:15 -070011
12typedef struct {
Jocelyn Bohra4ed3aa2015-07-30 10:44:16 -070013 TPMI_DH_OBJECT tpmKey;
Vadim Bendeburyf788ffb2015-06-05 12:57:27 -070014 TPMI_DH_ENTITY bind;
Jocelyn Bohra4ed3aa2015-07-30 10:44:16 -070015 TPM2B_NONCE nonceCaller;
Vadim Bendeburyf788ffb2015-06-05 12:57:27 -070016 TPM2B_ENCRYPTED_SECRET encryptedSalt;
Jocelyn Bohra4ed3aa2015-07-30 10:44:16 -070017 TPM_SE sessionType;
18 TPMT_SYM_DEF symmetric;
19 TPMI_ALG_HASH authHash;
Vadim Bendebury163cddf2015-06-01 18:46:15 -070020} StartAuthSession_In;
21
22typedef struct {
Jocelyn Bohra4ed3aa2015-07-30 10:44:16 -070023 TPMI_SH_AUTH_SESSION sessionHandle;
Vadim Bendeburyf788ffb2015-06-05 12:57:27 -070024 TPM2B_NONCE nonceTPM;
Vadim Bendebury163cddf2015-06-01 18:46:15 -070025} StartAuthSession_Out;
26
Jocelyn Bohra4ed3aa2015-07-30 10:44:16 -070027// Executes StartAuthSession with request handles and parameters from
28// |in| and computes response handles and parameters to |out|.
29TPM_RC TPM2_StartAuthSession(StartAuthSession_In* in,
30 StartAuthSession_Out* out);
Vadim Bendebury163cddf2015-06-01 18:46:15 -070031
Vadim Bendebury776e2362015-09-04 16:14:53 -070032// Unmarshals any request parameters starting at |request_parameter_buffer|.
Jocelyn Bohra4ed3aa2015-07-30 10:44:16 -070033// Executes command. Marshals any response handles and parameters to the
Vadim Bendebury776e2362015-09-04 16:14:53 -070034// global response buffer and computes |*response_handle_buffer_size| and
35// |*response_parameter_buffer_size|. If |tag| == TPM_ST_SESSIONS, marshals
Jocelyn Bohra4ed3aa2015-07-30 10:44:16 -070036// parameter_size indicating the size of the parameter area. parameter_size
37// field is located between the handle area and parameter area.
38TPM_RC Exec_StartAuthSession(TPMI_ST_COMMAND_TAG tag,
Vadim Bendebury776e2362015-09-04 16:14:53 -070039 BYTE** request_parameter_buffer,
40 INT32* request_parameter_buffer_size,
41 TPM_HANDLE request_handles[],
42 UINT32* response_handle_buffer_size,
43 UINT32* response_parameter_buffer_size);
Jocelyn Bohra4ed3aa2015-07-30 10:44:16 -070044
45#endif // TPM2_STARTAUTHSESSION_FP_H