Home | History | Annotate | Download | only in tpm2
      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_ACTIVATECREDENTIAL_FP_H_
      8 #define TPM2_ACTIVATECREDENTIAL_FP_H_
      9 
     10 #include "tpm_generated.h"
     11 
     12 typedef struct {
     13   TPMI_DH_OBJECT activateHandle;
     14   TPMI_DH_OBJECT keyHandle;
     15   TPM2B_ID_OBJECT credentialBlob;
     16   TPM2B_ENCRYPTED_SECRET secret;
     17 } ActivateCredential_In;
     18 
     19 typedef struct { TPM2B_DIGEST certInfo; } ActivateCredential_Out;
     20 
     21 // Executes ActivateCredential with request handles and parameters from
     22 // |in| and computes response handles and parameters to |out|.
     23 TPM_RC TPM2_ActivateCredential(ActivateCredential_In* in,
     24                                ActivateCredential_Out* out);
     25 
     26 // Initializes handle fields in |target| from |request_handles|. Unmarshals
     27 // parameter fields in |target| from |buffer|.
     28 TPM_RC ActivateCredential_In_Unmarshal(ActivateCredential_In* target,
     29                                        TPM_HANDLE request_handles[],
     30                                        BYTE** buffer,
     31                                        INT32* size);
     32 
     33 // Marshals response handles and parameters from |source| to |buffer|. Computes
     34 // and marshals the size of the parameter area (parameter_size) if |tag| ==
     35 // TPM_ST_SESSIONS. Returns size of (parameter area + handle area) in bytes.
     36 // Return value does not include parameter_size field.
     37 UINT16 ActivateCredential_Out_Marshal(ActivateCredential_Out* source,
     38                                       TPMI_ST_COMMAND_TAG tag,
     39                                       BYTE** buffer,
     40                                       INT32* size);
     41 
     42 // Unmarshals any request parameters starting at |request_parameter_buffer|.
     43 // Executes command. Marshals any response handles and parameters to the
     44 // global response buffer and computes |*response_handle_buffer_size| and
     45 // |*response_parameter_buffer_size|. If |tag| == TPM_ST_SESSIONS, marshals
     46 // parameter_size indicating the size of the parameter area. parameter_size
     47 // field is located between the handle area and parameter area.
     48 TPM_RC Exec_ActivateCredential(TPMI_ST_COMMAND_TAG tag,
     49                                BYTE** request_parameter_buffer,
     50                                INT32* request_parameter_buffer_size,
     51                                TPM_HANDLE request_handles[],
     52                                UINT32* response_handle_buffer_size,
     53                                UINT32* response_parameter_buffer_size);
     54 
     55 #endif  // TPM2_ACTIVATECREDENTIAL_FP_H
     56