blob: 79042af9061dbe475234b904f63ba0bd7bc9dab3 [file] [log] [blame]
// Copyright 2014 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// THIS CODE IS GENERATED - DO NOT MODIFY!
#ifndef TRUNKS_TPM_GENERATED_H_
#define TRUNKS_TPM_GENERATED_H_
#include <string>
#include <base/basictypes.h>
#include <base/callback_forward.h>
namespace trunks {
class AuthorizationDelegate;
class CommandTransceiver;
#if !defined(SHA1_DIGEST_SIZE)
#define SHA1_DIGEST_SIZE 20
#endif
#if !defined(SHA1_BLOCK_SIZE)
#define SHA1_BLOCK_SIZE 64
#endif
#if !defined(SHA1_DER_SIZE)
#define SHA1_DER_SIZE 15
#endif
#if !defined(SHA1_DER)
#define SHA1_DER {0x30,0x21,0x30,0x09,0x06,0x05,0x2B,0x0E,0x03,0x02,0x1A,0x05,0x00,0x04,0x14}
#endif
#if !defined(SHA256_DIGEST_SIZE)
#define SHA256_DIGEST_SIZE 32
#endif
#if !defined(SHA256_BLOCK_SIZE)
#define SHA256_BLOCK_SIZE 64
#endif
#if !defined(SHA256_DER_SIZE)
#define SHA256_DER_SIZE 19
#endif
#if !defined(SHA256_DER)
#define SHA256_DER {0x30,0x31,0x30,0x0d,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x01,0x05,0x00,0x04,0x20}
#endif
#if !defined(SHA384_DIGEST_SIZE)
#define SHA384_DIGEST_SIZE 48
#endif
#if !defined(SHA384_BLOCK_SIZE)
#define SHA384_BLOCK_SIZE 128
#endif
#if !defined(SHA384_DER_SIZE)
#define SHA384_DER_SIZE 19
#endif
#if !defined(SHA384_DER)
#define SHA384_DER {0x30,0x41,0x30,0x0d,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x02,0x05,0x00,0x04,0x30}
#endif
#if !defined(SHA512_DIGEST_SIZE)
#define SHA512_DIGEST_SIZE 64
#endif
#if !defined(SHA512_BLOCK_SIZE)
#define SHA512_BLOCK_SIZE 128
#endif
#if !defined(SHA512_DER_SIZE)
#define SHA512_DER_SIZE 19
#endif
#if !defined(SHA512_DER)
#define SHA512_DER {0x30,0x51,0x30,0x0d,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x03,0x05,0x00,0x04,0x40}
#endif
#if !defined(SM3_256_DIGEST_SIZE)
#define SM3_256_DIGEST_SIZE 32
#endif
#if !defined(SM3_256_BLOCK_SIZE)
#define SM3_256_BLOCK_SIZE 64
#endif
#if !defined(SM3_256_DER_SIZE)
#define SM3_256_DER_SIZE 18
#endif
#if !defined(SM3_256_DER)
#define SM3_256_DER {0x30,0x30,0x30,0x0c,0x06,0x08,0x2a,0x81,0x1c,0x81,0x45,0x01,0x83,0x11,0x05,0x00,0x04,0x20}
#endif
#if !defined(MAX_SESSION_NUMBER)
#define MAX_SESSION_NUMBER 3
#endif
#if !defined(YES)
#define YES 1
#endif
#if !defined(NO)
#define NO 0
#endif
#if !defined(TRUE)
#define TRUE 1
#endif
#if !defined(FALSE)
#define FALSE 0
#endif
#if !defined(SET)
#define SET 1
#endif
#if !defined(CLEAR)
#define CLEAR 0
#endif
#if !defined(BIG_ENDIAN_TPM)
#define BIG_ENDIAN_TPM NO
#endif
#if !defined(LITTLE_ENDIAN_TPM)
#define LITTLE_ENDIAN_TPM YES
#endif
#if !defined(NO_AUTO_ALIGN)
#define NO_AUTO_ALIGN NO
#endif
#if !defined(RSA_KEY_SIZES_BITS)
#define RSA_KEY_SIZES_BITS {1024, 2048}
#endif
#if !defined(MAX_RSA_KEY_BITS)
#define MAX_RSA_KEY_BITS 2048
#endif
#if !defined(MAX_RSA_KEY_BYTES)
#define MAX_RSA_KEY_BYTES ((MAX_RSA_KEY_BITS + 7) / 8)
#endif
#if !defined(ECC_CURVES)
#define ECC_CURVES {TPM_ECC_NIST_P256, TPM_ECC_BN_P256, TPM_ECC_SM2_P256}
#endif
#if !defined(ECC_KEY_SIZES_BITS)
#define ECC_KEY_SIZES_BITS {256}
#endif
#if !defined(MAX_ECC_KEY_BITS)
#define MAX_ECC_KEY_BITS 256
#endif
#if !defined(MAX_ECC_KEY_BYTES)
#define MAX_ECC_KEY_BYTES ((MAX_ECC_KEY_BITS + 7) / 8)
#endif
#if !defined(AES_KEY_SIZES_BITS)
#define AES_KEY_SIZES_BITS {128}
#endif
#if !defined(MAX_AES_KEY_BITS)
#define MAX_AES_KEY_BITS 128
#endif
#if !defined(MAX_AES_BLOCK_SIZE_BYTES)
#define MAX_AES_BLOCK_SIZE_BYTES 16
#endif
#if !defined(MAX_AES_KEY_BYTES)
#define MAX_AES_KEY_BYTES ((MAX_AES_KEY_BITS + 7) / 8)
#endif
#if !defined(SM4_KEY_SIZES_BITS)
#define SM4_KEY_SIZES_BITS {128}
#endif
#if !defined(MAX_SM4_KEY_BITS)
#define MAX_SM4_KEY_BITS 128
#endif
#if !defined(MAX_SM4_BLOCK_SIZE_BYTES)
#define MAX_SM4_BLOCK_SIZE_BYTES 16
#endif
#if !defined(MAX_SM4_KEY_BYTES)
#define MAX_SM4_KEY_BYTES ((MAX_SM4_KEY_BITS + 7) / 8)
#endif
#if !defined(MAX_SYM_KEY_BITS)
#define MAX_SYM_KEY_BITS MAX_AES_KEY_BITS
#endif
#if !defined(MAX_SYM_KEY_BYTES)
#define MAX_SYM_KEY_BYTES MAX_AES_KEY_BYTES
#endif
#if !defined(MAX_SYM_BLOCK_SIZE)
#define MAX_SYM_BLOCK_SIZE MAX_AES_BLOCK_SIZE_BYTES
#endif
#if !defined(FIELD_UPGRADE_IMPLEMENTED)
#define FIELD_UPGRADE_IMPLEMENTED NO
#endif
#if !defined(BSIZE)
#define BSIZE UINT16
#endif
#if !defined(BUFFER_ALIGNMENT)
#define BUFFER_ALIGNMENT 4
#endif
#if !defined(IMPLEMENTATION_PCR)
#define IMPLEMENTATION_PCR 24
#endif
#if !defined(PLATFORM_PCR)
#define PLATFORM_PCR 24
#endif
#if !defined(DRTM_PCR)
#define DRTM_PCR 17
#endif
#if !defined(HCRTM_PCR)
#define HCRTM_PCR 0
#endif
#if !defined(NUM_LOCALITIES)
#define NUM_LOCALITIES 5
#endif
#if !defined(MAX_HANDLE_NUM)
#define MAX_HANDLE_NUM 3
#endif
#if !defined(MAX_ACTIVE_SESSIONS)
#define MAX_ACTIVE_SESSIONS 64
#endif
#if !defined(CONTEXT_SLOT)
#define CONTEXT_SLOT UINT16
#endif
#if !defined(CONTEXT_COUNTER)
#define CONTEXT_COUNTER UINT64
#endif
#if !defined(MAX_LOADED_SESSIONS)
#define MAX_LOADED_SESSIONS 3
#endif
#if !defined(MAX_SESSION_NUM)
#define MAX_SESSION_NUM 3
#endif
#if !defined(MAX_LOADED_OBJECTS)
#define MAX_LOADED_OBJECTS 3
#endif
#if !defined(MIN_EVICT_OBJECTS)
#define MIN_EVICT_OBJECTS 2
#endif
#if !defined(PCR_SELECT_MIN)
#define PCR_SELECT_MIN ((PLATFORM_PCR+7)/8)
#endif
#if !defined(PCR_SELECT_MAX)
#define PCR_SELECT_MAX ((IMPLEMENTATION_PCR+7)/8)
#endif
#if !defined(NUM_POLICY_PCR_GROUP)
#define NUM_POLICY_PCR_GROUP 1
#endif
#if !defined(NUM_AUTHVALUE_PCR_GROUP)
#define NUM_AUTHVALUE_PCR_GROUP 1
#endif
#if !defined(MAX_CONTEXT_SIZE)
#define MAX_CONTEXT_SIZE 4000
#endif
#if !defined(MAX_DIGEST_BUFFER)
#define MAX_DIGEST_BUFFER 1024
#endif
#if !defined(MAX_NV_INDEX_SIZE)
#define MAX_NV_INDEX_SIZE 2048
#endif
#if !defined(MAX_NV_BUFFER_SIZE)
#define MAX_NV_BUFFER_SIZE 1024
#endif
#if !defined(MAX_CAP_BUFFER)
#define MAX_CAP_BUFFER 1024
#endif
#if !defined(NV_MEMORY_SIZE)
#define NV_MEMORY_SIZE 16384
#endif
#if !defined(NUM_STATIC_PCR)
#define NUM_STATIC_PCR 16
#endif
#if !defined(MAX_ALG_LIST_SIZE)
#define MAX_ALG_LIST_SIZE 64
#endif
#if !defined(TIMER_PRESCALE)
#define TIMER_PRESCALE 100000
#endif
#if !defined(PRIMARY_SEED_SIZE)
#define PRIMARY_SEED_SIZE 32
#endif
#if !defined(CONTEXT_ENCRYPT_ALG)
#define CONTEXT_ENCRYPT_ALG TPM_ALG_AES
#endif
#if !defined(CONTEXT_ENCRYPT_KEY_BITS)
#define CONTEXT_ENCRYPT_KEY_BITS MAX_SYM_KEY_BITS
#endif
#if !defined(CONTEXT_ENCRYPT_KEY_BYTES)
#define CONTEXT_ENCRYPT_KEY_BYTES ((CONTEXT_ENCRYPT_KEY_BITS+7)/8)
#endif
#if !defined(CONTEXT_INTEGRITY_HASH_ALG)
#define CONTEXT_INTEGRITY_HASH_ALG TPM_ALG_SHA256
#endif
#if !defined(CONTEXT_INTEGRITY_HASH_SIZE)
#define CONTEXT_INTEGRITY_HASH_SIZE SHA256_DIGEST_SIZE
#endif
#if !defined(PROOF_SIZE)
#define PROOF_SIZE CONTEXT_INTEGRITY_HASH_SIZE
#endif
#if !defined(NV_CLOCK_UPDATE_INTERVAL)
#define NV_CLOCK_UPDATE_INTERVAL 12
#endif
#if !defined(NUM_POLICY_PCR)
#define NUM_POLICY_PCR 1
#endif
#if !defined(MAX_COMMAND_SIZE)
#define MAX_COMMAND_SIZE 4096
#endif
#if !defined(MAX_RESPONSE_SIZE)
#define MAX_RESPONSE_SIZE 4096
#endif
#if !defined(ORDERLY_BITS)
#define ORDERLY_BITS 8
#endif
#if !defined(MAX_ORDERLY_COUNT)
#define MAX_ORDERLY_COUNT ((1 << ORDERLY_BITS) - 1)
#endif
#if !defined(ALG_ID_FIRST)
#define ALG_ID_FIRST TPM_ALG_FIRST
#endif
#if !defined(ALG_ID_LAST)
#define ALG_ID_LAST TPM_ALG_LAST
#endif
#if !defined(MAX_SYM_DATA)
#define MAX_SYM_DATA 128
#endif
#if !defined(MAX_RNG_ENTROPY_SIZE)
#define MAX_RNG_ENTROPY_SIZE 64
#endif
#if !defined(RAM_INDEX_SPACE)
#define RAM_INDEX_SPACE 512
#endif
#if !defined(RSA_DEFAULT_PUBLIC_EXPONENT)
#define RSA_DEFAULT_PUBLIC_EXPONENT 0x00010001
#endif
#if !defined(ENABLE_PCR_NO_INCREMENT)
#define ENABLE_PCR_NO_INCREMENT YES
#endif
#if !defined(CRT_FORMAT_RSA)
#define CRT_FORMAT_RSA YES
#endif
#if !defined(PRIVATE_VENDOR_SPECIFIC_BYTES)
#define PRIVATE_VENDOR_SPECIFIC_BYTES ((MAX_RSA_KEY_BYTES/2) * (3 + CRT_FORMAT_RSA * 2))
#endif
#if !defined(MAX_CAP_DATA)
#define MAX_CAP_DATA (MAX_CAP_BUFFER-sizeof(TPM_CAP)-sizeof(UINT32))
#endif
#if !defined(MAX_CAP_ALGS)
#define MAX_CAP_ALGS (TPM_ALG_LAST - TPM_ALG_FIRST + 1)
#endif
#if !defined(MAX_CAP_HANDLES)
#define MAX_CAP_HANDLES (MAX_CAP_DATA/sizeof(TPM_HANDLE))
#endif
#if !defined(MAX_CAP_CC)
#define MAX_CAP_CC ((TPM_CC_LAST - TPM_CC_FIRST) + 1)
#endif
#if !defined(MAX_TPM_PROPERTIES)
#define MAX_TPM_PROPERTIES (MAX_CAP_DATA/sizeof(TPMS_TAGGED_PROPERTY))
#endif
#if !defined(MAX_PCR_PROPERTIES)
#define MAX_PCR_PROPERTIES (MAX_CAP_DATA/sizeof(TPMS_TAGGED_PCR_SELECT))
#endif
#if !defined(MAX_ECC_CURVES)
#define MAX_ECC_CURVES (MAX_CAP_DATA/sizeof(TPM_ECC_CURVE))
#endif
#if !defined(HASH_COUNT)
#define HASH_COUNT 3
#endif
typedef uint8_t UINT8;
typedef uint8_t BYTE;
typedef int8_t INT8;
typedef int BOOL;
typedef uint16_t UINT16;
typedef int16_t INT16;
typedef uint32_t UINT32;
typedef int32_t INT32;
typedef uint64_t UINT64;
typedef int64_t INT64;
typedef UINT32 TPM_ALGORITHM_ID;
typedef UINT32 TPM_MODIFIER_INDICATOR;
typedef UINT32 TPM_AUTHORIZATION_SIZE;
typedef UINT32 TPM_PARAMETER_SIZE;
typedef UINT16 TPM_KEY_SIZE;
typedef UINT16 TPM_KEY_BITS;
typedef UINT32 TPM_HANDLE;
struct TPM2B_DIGEST;
typedef TPM2B_DIGEST TPM2B_NONCE;
typedef TPM2B_DIGEST TPM2B_AUTH;
typedef TPM2B_DIGEST TPM2B_OPERAND;
struct TPMS_SCHEME_SIGHASH;
typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_HMAC;
typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_RSASSA;
typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_RSAPSS;
typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_ECDSA;
typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_SM2;
typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_ECSCHNORR;
typedef BYTE TPMI_YES_NO;
typedef TPM_HANDLE TPMI_DH_OBJECT;
typedef TPM_HANDLE TPMI_DH_PERSISTENT;
typedef TPM_HANDLE TPMI_DH_ENTITY;
typedef TPM_HANDLE TPMI_DH_PCR;
typedef TPM_HANDLE TPMI_SH_AUTH_SESSION;
typedef TPM_HANDLE TPMI_SH_HMAC;
typedef TPM_HANDLE TPMI_SH_POLICY;
typedef TPM_HANDLE TPMI_DH_CONTEXT;
typedef TPM_HANDLE TPMI_RH_HIERARCHY;
typedef TPM_HANDLE TPMI_RH_ENABLES;
typedef TPM_HANDLE TPMI_RH_HIERARCHY_AUTH;
typedef TPM_HANDLE TPMI_RH_PLATFORM;
typedef TPM_HANDLE TPMI_RH_OWNER;
typedef TPM_HANDLE TPMI_RH_ENDORSEMENT;
typedef TPM_HANDLE TPMI_RH_PROVISION;
typedef TPM_HANDLE TPMI_RH_CLEAR;
typedef TPM_HANDLE TPMI_RH_NV_AUTH;
typedef TPM_HANDLE TPMI_RH_LOCKOUT;
typedef TPM_HANDLE TPMI_RH_NV_INDEX;
typedef UINT16 TPM_ALG_ID;
typedef TPM_ALG_ID TPMI_ALG_HASH;
typedef TPM_ALG_ID TPMI_ALG_ASYM;
typedef TPM_ALG_ID TPMI_ALG_SYM;
typedef TPM_ALG_ID TPMI_ALG_SYM_OBJECT;
typedef TPM_ALG_ID TPMI_ALG_SYM_MODE;
typedef TPM_ALG_ID TPMI_ALG_KDF;
typedef TPM_ALG_ID TPMI_ALG_SIG_SCHEME;
typedef TPM_ALG_ID TPMI_ECC_KEY_EXCHANGE;
typedef UINT16 TPM_ST;
typedef TPM_ST TPMI_ST_COMMAND_TAG;
typedef TPM_ST TPMI_ST_ATTEST;
typedef TPM_KEY_BITS TPMI_AES_KEY_BITS;
typedef TPM_KEY_BITS TPMI_SM4_KEY_BITS;
typedef TPM_ALG_ID TPMI_ALG_KEYEDHASH_SCHEME;
typedef TPM_ALG_ID TPMI_ALG_ASYM_SCHEME;
typedef TPM_ALG_ID TPMI_ALG_RSA_SCHEME;
typedef TPM_ALG_ID TPMI_ALG_RSA_DECRYPT;
typedef TPM_KEY_BITS TPMI_RSA_KEY_BITS;
typedef TPM_ALG_ID TPMI_ALG_ECC_SCHEME;
typedef UINT16 TPM_ECC_CURVE;
typedef TPM_ECC_CURVE TPMI_ECC_CURVE;
typedef TPM_ALG_ID TPMI_ALG_PUBLIC;
typedef UINT32 TPMA_ALGORITHM;
typedef UINT32 TPMA_OBJECT;
typedef UINT8 TPMA_SESSION;
typedef UINT8 TPMA_LOCALITY;
typedef UINT32 TPMA_PERMANENT;
typedef UINT32 TPMA_STARTUP_CLEAR;
typedef UINT32 TPMA_MEMORY;
typedef UINT32 TPM_CC;
typedef TPM_CC TPMA_CC;
typedef UINT32 TPM_NV_INDEX;
typedef UINT32 TPMA_NV;
typedef UINT32 TPM_SPEC;
typedef UINT32 TPM_GENERATED;
typedef UINT32 TPM_RC;
typedef INT8 TPM_CLOCK_ADJUST;
typedef UINT16 TPM_EO;
typedef UINT16 TPM_SU;
typedef UINT8 TPM_SE;
typedef UINT32 TPM_CAP;
typedef UINT32 TPM_PT;
typedef UINT32 TPM_PT_PCR;
typedef UINT32 TPM_PS;
typedef UINT8 TPM_HT;
typedef UINT32 TPM_RH;
typedef TPM_HANDLE TPM_HC;
const TPM_SPEC TPM_SPEC_FAMILY = 0x322E3000;
const TPM_SPEC TPM_SPEC_LEVEL = 00;
const TPM_SPEC TPM_SPEC_VERSION = 99;
const TPM_SPEC TPM_SPEC_YEAR = 2013;
const TPM_SPEC TPM_SPEC_DAY_OF_YEAR = 304;
const TPM_GENERATED TPM_GENERATED_VALUE = 0xff544347;
const TPM_ALG_ID TPM_ALG_ERROR = 0x0000;
const TPM_ALG_ID TPM_ALG_FIRST = 0x0001;
const TPM_ALG_ID TPM_ALG_RSA = 0x0001;
const TPM_ALG_ID TPM_ALG_SHA = 0x0004;
const TPM_ALG_ID TPM_ALG_SHA1 = 0x0004;
const TPM_ALG_ID TPM_ALG_HMAC = 0x0005;
const TPM_ALG_ID TPM_ALG_AES = 0x0006;
const TPM_ALG_ID TPM_ALG_MGF1 = 0x0007;
const TPM_ALG_ID TPM_ALG_KEYEDHASH = 0x0008;
const TPM_ALG_ID TPM_ALG_XOR = 0x000A;
const TPM_ALG_ID TPM_ALG_SHA256 = 0x000B;
const TPM_ALG_ID TPM_ALG_SHA384 = 0x000C;
const TPM_ALG_ID TPM_ALG_SHA512 = 0x000D;
const TPM_ALG_ID TPM_ALG_NULL = 0x0010;
const TPM_ALG_ID TPM_ALG_SM3_256 = 0x0012;
const TPM_ALG_ID TPM_ALG_SM4 = 0x0013;
const TPM_ALG_ID TPM_ALG_RSASSA = 0x0014;
const TPM_ALG_ID TPM_ALG_RSAES = 0x0015;
const TPM_ALG_ID TPM_ALG_RSAPSS = 0x0016;
const TPM_ALG_ID TPM_ALG_OAEP = 0x0017;
const TPM_ALG_ID TPM_ALG_ECDSA = 0x0018;
const TPM_ALG_ID TPM_ALG_ECDH = 0x0019;
const TPM_ALG_ID TPM_ALG_ECDAA = 0x001A;
const TPM_ALG_ID TPM_ALG_SM2 = 0x001B;
const TPM_ALG_ID TPM_ALG_ECSCHNORR = 0x001C;
const TPM_ALG_ID TPM_ALG_ECMQV = 0x001D;
const TPM_ALG_ID TPM_ALG_KDF1_SP800_56a = 0x0020;
const TPM_ALG_ID TPM_ALG_KDF2 = 0x0021;
const TPM_ALG_ID TPM_ALG_KDF1_SP800_108 = 0x0022;
const TPM_ALG_ID TPM_ALG_ECC = 0x0023;
const TPM_ALG_ID TPM_ALG_SYMCIPHER = 0x0025;
const TPM_ALG_ID TPM_ALG_CTR = 0x0040;
const TPM_ALG_ID TPM_ALG_OFB = 0x0041;
const TPM_ALG_ID TPM_ALG_CBC = 0x0042;
const TPM_ALG_ID TPM_ALG_CFB = 0x0043;
const TPM_ALG_ID TPM_ALG_ECB = 0x0044;
const TPM_ALG_ID TPM_ALG_LAST = 0x0044;
const TPM_ECC_CURVE TPM_ECC_NONE = 0x0000;
const TPM_ECC_CURVE TPM_ECC_NIST_P192 = 0x0001;
const TPM_ECC_CURVE TPM_ECC_NIST_P224 = 0x0002;
const TPM_ECC_CURVE TPM_ECC_NIST_P256 = 0x0003;
const TPM_ECC_CURVE TPM_ECC_NIST_P384 = 0x0004;
const TPM_ECC_CURVE TPM_ECC_NIST_P521 = 0x0005;
const TPM_ECC_CURVE TPM_ECC_BN_P256 = 0x0010;
const TPM_ECC_CURVE TPM_ECC_BN_P638 = 0x0011;
const TPM_ECC_CURVE TPM_ECC_SM2_P256 = 0x0020;
const TPM_CC TPM_CC_FIRST = 0x0000011F;
const TPM_CC TPM_CC_PP_FIRST = 0x0000011F;
const TPM_CC TPM_CC_NV_UndefineSpaceSpecial = 0x0000011F;
const TPM_CC TPM_CC_EvictControl = 0x00000120;
const TPM_CC TPM_CC_HierarchyControl = 0x00000121;
const TPM_CC TPM_CC_NV_UndefineSpace = 0x00000122;
const TPM_CC TPM_CC_ChangeEPS = 0x00000124;
const TPM_CC TPM_CC_ChangePPS = 0x00000125;
const TPM_CC TPM_CC_Clear = 0x00000126;
const TPM_CC TPM_CC_ClearControl = 0x00000127;
const TPM_CC TPM_CC_ClockSet = 0x00000128;
const TPM_CC TPM_CC_HierarchyChangeAuth = 0x00000129;
const TPM_CC TPM_CC_NV_DefineSpace = 0x0000012A;
const TPM_CC TPM_CC_PCR_Allocate = 0x0000012B;
const TPM_CC TPM_CC_PCR_SetAuthPolicy = 0x0000012C;
const TPM_CC TPM_CC_PP_Commands = 0x0000012D;
const TPM_CC TPM_CC_SetPrimaryPolicy = 0x0000012E;
const TPM_CC TPM_CC_FieldUpgradeStart = 0x0000012F;
const TPM_CC TPM_CC_ClockRateAdjust = 0x00000130;
const TPM_CC TPM_CC_CreatePrimary = 0x00000131;
const TPM_CC TPM_CC_NV_GlobalWriteLock = 0x00000132;
const TPM_CC TPM_CC_PP_LAST = 0x00000132;
const TPM_CC TPM_CC_GetCommandAuditDigest = 0x00000133;
const TPM_CC TPM_CC_NV_Increment = 0x00000134;
const TPM_CC TPM_CC_NV_SetBits = 0x00000135;
const TPM_CC TPM_CC_NV_Extend = 0x00000136;
const TPM_CC TPM_CC_NV_Write = 0x00000137;
const TPM_CC TPM_CC_NV_WriteLock = 0x00000138;
const TPM_CC TPM_CC_DictionaryAttackLockReset = 0x00000139;
const TPM_CC TPM_CC_DictionaryAttackParameters = 0x0000013A;
const TPM_CC TPM_CC_NV_ChangeAuth = 0x0000013B;
const TPM_CC TPM_CC_PCR_Event = 0x0000013C;
const TPM_CC TPM_CC_PCR_Reset = 0x0000013D;
const TPM_CC TPM_CC_SequenceComplete = 0x0000013E;
const TPM_CC TPM_CC_SetAlgorithmSet = 0x0000013F;
const TPM_CC TPM_CC_SetCommandCodeAuditStatus = 0x00000140;
const TPM_CC TPM_CC_FieldUpgradeData = 0x00000141;
const TPM_CC TPM_CC_IncrementalSelfTest = 0x00000142;
const TPM_CC TPM_CC_SelfTest = 0x00000143;
const TPM_CC TPM_CC_Startup = 0x00000144;
const TPM_CC TPM_CC_Shutdown = 0x00000145;
const TPM_CC TPM_CC_StirRandom = 0x00000146;
const TPM_CC TPM_CC_ActivateCredential = 0x00000147;
const TPM_CC TPM_CC_Certify = 0x00000148;
const TPM_CC TPM_CC_PolicyNV = 0x00000149;
const TPM_CC TPM_CC_CertifyCreation = 0x0000014A;
const TPM_CC TPM_CC_Duplicate = 0x0000014B;
const TPM_CC TPM_CC_GetTime = 0x0000014C;
const TPM_CC TPM_CC_GetSessionAuditDigest = 0x0000014D;
const TPM_CC TPM_CC_NV_Read = 0x0000014E;
const TPM_CC TPM_CC_NV_ReadLock = 0x0000014F;
const TPM_CC TPM_CC_ObjectChangeAuth = 0x00000150;
const TPM_CC TPM_CC_PolicySecret = 0x00000151;
const TPM_CC TPM_CC_Rewrap = 0x00000152;
const TPM_CC TPM_CC_Create = 0x00000153;
const TPM_CC TPM_CC_ECDH_ZGen = 0x00000154;
const TPM_CC TPM_CC_HMAC = 0x00000155;
const TPM_CC TPM_CC_Import = 0x00000156;
const TPM_CC TPM_CC_Load = 0x00000157;
const TPM_CC TPM_CC_Quote = 0x00000158;
const TPM_CC TPM_CC_RSA_Decrypt = 0x00000159;
const TPM_CC TPM_CC_HMAC_Start = 0x0000015B;
const TPM_CC TPM_CC_SequenceUpdate = 0x0000015C;
const TPM_CC TPM_CC_Sign = 0x0000015D;
const TPM_CC TPM_CC_Unseal = 0x0000015E;
const TPM_CC TPM_CC_PolicySigned = 0x00000160;
const TPM_CC TPM_CC_ContextLoad = 0x00000161;
const TPM_CC TPM_CC_ContextSave = 0x00000162;
const TPM_CC TPM_CC_ECDH_KeyGen = 0x00000163;
const TPM_CC TPM_CC_EncryptDecrypt = 0x00000164;
const TPM_CC TPM_CC_FlushContext = 0x00000165;
const TPM_CC TPM_CC_LoadExternal = 0x00000167;
const TPM_CC TPM_CC_MakeCredential = 0x00000168;
const TPM_CC TPM_CC_NV_ReadPublic = 0x00000169;
const TPM_CC TPM_CC_PolicyAuthorize = 0x0000016A;
const TPM_CC TPM_CC_PolicyAuthValue = 0x0000016B;
const TPM_CC TPM_CC_PolicyCommandCode = 0x0000016C;
const TPM_CC TPM_CC_PolicyCounterTimer = 0x0000016D;
const TPM_CC TPM_CC_PolicyCpHash = 0x0000016E;
const TPM_CC TPM_CC_PolicyLocality = 0x0000016F;
const TPM_CC TPM_CC_PolicyNameHash = 0x00000170;
const TPM_CC TPM_CC_PolicyOR = 0x00000171;
const TPM_CC TPM_CC_PolicyTicket = 0x00000172;
const TPM_CC TPM_CC_ReadPublic = 0x00000173;
const TPM_CC TPM_CC_RSA_Encrypt = 0x00000174;
const TPM_CC TPM_CC_StartAuthSession = 0x00000176;
const TPM_CC TPM_CC_VerifySignature = 0x00000177;
const TPM_CC TPM_CC_ECC_Parameters = 0x00000178;
const TPM_CC TPM_CC_FirmwareRead = 0x00000179;
const TPM_CC TPM_CC_GetCapability = 0x0000017A;
const TPM_CC TPM_CC_GetRandom = 0x0000017B;
const TPM_CC TPM_CC_GetTestResult = 0x0000017C;
const TPM_CC TPM_CC_Hash = 0x0000017D;
const TPM_CC TPM_CC_PCR_Read = 0x0000017E;
const TPM_CC TPM_CC_PolicyPCR = 0x0000017F;
const TPM_CC TPM_CC_PolicyRestart = 0x00000180;
const TPM_CC TPM_CC_ReadClock = 0x00000181;
const TPM_CC TPM_CC_PCR_Extend = 0x00000182;
const TPM_CC TPM_CC_PCR_SetAuthValue = 0x00000183;
const TPM_CC TPM_CC_NV_Certify = 0x00000184;
const TPM_CC TPM_CC_EventSequenceComplete = 0x00000185;
const TPM_CC TPM_CC_HashSequenceStart = 0x00000186;
const TPM_CC TPM_CC_PolicyPhysicalPresence = 0x00000187;
const TPM_CC TPM_CC_PolicyDuplicationSelect = 0x00000188;
const TPM_CC TPM_CC_PolicyGetDigest = 0x00000189;
const TPM_CC TPM_CC_TestParms = 0x0000018A;
const TPM_CC TPM_CC_Commit = 0x0000018B;
const TPM_CC TPM_CC_PolicyPassword = 0x0000018C;
const TPM_CC TPM_CC_ZGen_2Phase = 0x0000018D;
const TPM_CC TPM_CC_EC_Ephemeral = 0x0000018E;
const TPM_CC TPM_CC_PolicyNvWritten = 0x0000018F;
const TPM_CC TPM_CC_LAST = 0x0000018F;
const TPM_RC TPM_RC_SUCCESS = 0x000;
const TPM_RC TPM_RC_BAD_TAG = 0x01E;
const TPM_RC RC_VER1 = 0x100;
const TPM_RC TPM_RC_INITIALIZE = RC_VER1 + 0x000;
const TPM_RC TPM_RC_FAILURE = RC_VER1 + 0x001;
const TPM_RC TPM_RC_SEQUENCE = RC_VER1 + 0x003;
const TPM_RC TPM_RC_PRIVATE = RC_VER1 + 0x00B;
const TPM_RC TPM_RC_HMAC = RC_VER1 + 0x019;
const TPM_RC TPM_RC_DISABLED = RC_VER1 + 0x020;
const TPM_RC TPM_RC_EXCLUSIVE = RC_VER1 + 0x021;
const TPM_RC TPM_RC_AUTH_TYPE = RC_VER1 + 0x024;
const TPM_RC TPM_RC_AUTH_MISSING = RC_VER1 + 0x025;
const TPM_RC TPM_RC_POLICY = RC_VER1 + 0x026;
const TPM_RC TPM_RC_PCR = RC_VER1 + 0x027;
const TPM_RC TPM_RC_PCR_CHANGED = RC_VER1 + 0x028;
const TPM_RC TPM_RC_UPGRADE = RC_VER1 + 0x02D;
const TPM_RC TPM_RC_TOO_MANY_CONTEXTS = RC_VER1 + 0x02E;
const TPM_RC TPM_RC_AUTH_UNAVAILABLE = RC_VER1 + 0x02F;
const TPM_RC TPM_RC_REBOOT = RC_VER1 + 0x030;
const TPM_RC TPM_RC_UNBALANCED = RC_VER1 + 0x031;
const TPM_RC TPM_RC_COMMAND_SIZE = RC_VER1 + 0x042;
const TPM_RC TPM_RC_COMMAND_CODE = RC_VER1 + 0x043;
const TPM_RC TPM_RC_AUTHSIZE = RC_VER1 + 0x044;
const TPM_RC TPM_RC_AUTH_CONTEXT = RC_VER1 + 0x045;
const TPM_RC TPM_RC_NV_RANGE = RC_VER1 + 0x046;
const TPM_RC TPM_RC_NV_SIZE = RC_VER1 + 0x047;
const TPM_RC TPM_RC_NV_LOCKED = RC_VER1 + 0x048;
const TPM_RC TPM_RC_NV_AUTHORIZATION = RC_VER1 + 0x049;
const TPM_RC TPM_RC_NV_UNINITIALIZED = RC_VER1 + 0x04A;
const TPM_RC TPM_RC_NV_SPACE = RC_VER1 + 0x04B;
const TPM_RC TPM_RC_NV_DEFINED = RC_VER1 + 0x04C;
const TPM_RC TPM_RC_BAD_CONTEXT = RC_VER1 + 0x050;
const TPM_RC TPM_RC_CPHASH = RC_VER1 + 0x051;
const TPM_RC TPM_RC_PARENT = RC_VER1 + 0x052;
const TPM_RC TPM_RC_NEEDS_TEST = RC_VER1 + 0x053;
const TPM_RC TPM_RC_NO_RESULT = RC_VER1 + 0x054;
const TPM_RC TPM_RC_SENSITIVE = RC_VER1 + 0x055;
const TPM_RC RC_MAX_FM0 = RC_VER1 + 0x07F;
const TPM_RC RC_FMT1 = 0x080;
const TPM_RC TPM_RC_ASYMMETRIC = RC_FMT1 + 0x001;
const TPM_RC TPM_RC_ATTRIBUTES = RC_FMT1 + 0x002;
const TPM_RC TPM_RC_HASH = RC_FMT1 + 0x003;
const TPM_RC TPM_RC_VALUE = RC_FMT1 + 0x004;
const TPM_RC TPM_RC_HIERARCHY = RC_FMT1 + 0x005;
const TPM_RC TPM_RC_KEY_SIZE = RC_FMT1 + 0x007;
const TPM_RC TPM_RC_MGF = RC_FMT1 + 0x008;
const TPM_RC TPM_RC_MODE = RC_FMT1 + 0x009;
const TPM_RC TPM_RC_TYPE = RC_FMT1 + 0x00A;
const TPM_RC TPM_RC_HANDLE = RC_FMT1 + 0x00B;
const TPM_RC TPM_RC_KDF = RC_FMT1 + 0x00C;
const TPM_RC TPM_RC_RANGE = RC_FMT1 + 0x00D;
const TPM_RC TPM_RC_AUTH_FAIL = RC_FMT1 + 0x00E;
const TPM_RC TPM_RC_NONCE = RC_FMT1 + 0x00F;
const TPM_RC TPM_RC_PP = RC_FMT1 + 0x010;
const TPM_RC TPM_RC_SCHEME = RC_FMT1 + 0x012;
const TPM_RC TPM_RC_SIZE = RC_FMT1 + 0x015;
const TPM_RC TPM_RC_SYMMETRIC = RC_FMT1 + 0x016;
const TPM_RC TPM_RC_TAG = RC_FMT1 + 0x017;
const TPM_RC TPM_RC_SELECTOR = RC_FMT1 + 0x018;
const TPM_RC TPM_RC_INSUFFICIENT = RC_FMT1 + 0x01A;
const TPM_RC TPM_RC_SIGNATURE = RC_FMT1 + 0x01B;
const TPM_RC TPM_RC_KEY = RC_FMT1 + 0x01C;
const TPM_RC TPM_RC_POLICY_FAIL = RC_FMT1 + 0x01D;
const TPM_RC TPM_RC_INTEGRITY = RC_FMT1 + 0x01F;
const TPM_RC TPM_RC_TICKET = RC_FMT1 + 0x020;
const TPM_RC TPM_RC_RESERVED_BITS = RC_FMT1 + 0x021;
const TPM_RC TPM_RC_BAD_AUTH = RC_FMT1 + 0x022;
const TPM_RC TPM_RC_EXPIRED = RC_FMT1 + 0x023;
const TPM_RC TPM_RC_POLICY_CC = RC_FMT1 + 0x024;
const TPM_RC TPM_RC_BINDING = RC_FMT1 + 0x025;
const TPM_RC TPM_RC_CURVE = RC_FMT1 + 0x026;
const TPM_RC TPM_RC_ECC_POINT = RC_FMT1 + 0x027;
const TPM_RC RC_WARN = 0x900;
const TPM_RC TPM_RC_CONTEXT_GAP = RC_WARN + 0x001;
const TPM_RC TPM_RC_OBJECT_MEMORY = RC_WARN + 0x002;
const TPM_RC TPM_RC_SESSION_MEMORY = RC_WARN + 0x003;
const TPM_RC TPM_RC_MEMORY = RC_WARN + 0x004;
const TPM_RC TPM_RC_SESSION_HANDLES = RC_WARN + 0x005;
const TPM_RC TPM_RC_OBJECT_HANDLES = RC_WARN + 0x006;
const TPM_RC TPM_RC_LOCALITY = RC_WARN + 0x007;
const TPM_RC TPM_RC_YIELDED = RC_WARN + 0x008;
const TPM_RC TPM_RC_CANCELED = RC_WARN + 0x009;
const TPM_RC TPM_RC_TESTING = RC_WARN + 0x00A;
const TPM_RC TPM_RC_REFERENCE_H0 = RC_WARN + 0x010;
const TPM_RC TPM_RC_REFERENCE_H1 = RC_WARN + 0x011;
const TPM_RC TPM_RC_REFERENCE_H2 = RC_WARN + 0x012;
const TPM_RC TPM_RC_REFERENCE_H3 = RC_WARN + 0x013;
const TPM_RC TPM_RC_REFERENCE_H4 = RC_WARN + 0x014;
const TPM_RC TPM_RC_REFERENCE_H5 = RC_WARN + 0x015;
const TPM_RC TPM_RC_REFERENCE_H6 = RC_WARN + 0x016;
const TPM_RC TPM_RC_REFERENCE_S0 = RC_WARN + 0x018;
const TPM_RC TPM_RC_REFERENCE_S1 = RC_WARN + 0x019;
const TPM_RC TPM_RC_REFERENCE_S2 = RC_WARN + 0x01A;
const TPM_RC TPM_RC_REFERENCE_S3 = RC_WARN + 0x01B;
const TPM_RC TPM_RC_REFERENCE_S4 = RC_WARN + 0x01C;
const TPM_RC TPM_RC_REFERENCE_S5 = RC_WARN + 0x01D;
const TPM_RC TPM_RC_REFERENCE_S6 = RC_WARN + 0x01E;
const TPM_RC TPM_RC_NV_RATE = RC_WARN + 0x020;
const TPM_RC TPM_RC_LOCKOUT = RC_WARN + 0x021;
const TPM_RC TPM_RC_RETRY = RC_WARN + 0x022;
const TPM_RC TPM_RC_NV_UNAVAILABLE = RC_WARN + 0x023;
const TPM_RC TPM_RC_NOT_USED = RC_WARN + 0x7F;
const TPM_RC TPM_RC_H = 0x000;
const TPM_RC TPM_RC_P = 0x040;
const TPM_RC TPM_RC_S = 0x800;
const TPM_RC TPM_RC_1 = 0x100;
const TPM_RC TPM_RC_2 = 0x200;
const TPM_RC TPM_RC_3 = 0x300;
const TPM_RC TPM_RC_4 = 0x400;
const TPM_RC TPM_RC_5 = 0x500;
const TPM_RC TPM_RC_6 = 0x600;
const TPM_RC TPM_RC_7 = 0x700;
const TPM_RC TPM_RC_8 = 0x800;
const TPM_RC TPM_RC_9 = 0x900;
const TPM_RC TPM_RC_A = 0xA00;
const TPM_RC TPM_RC_B = 0xB00;
const TPM_RC TPM_RC_C = 0xC00;
const TPM_RC TPM_RC_D = 0xD00;
const TPM_RC TPM_RC_E = 0xE00;
const TPM_RC TPM_RC_F = 0xF00;
const TPM_RC TPM_RC_N_MASK = 0xF00;
const TPM_CLOCK_ADJUST TPM_CLOCK_COARSE_SLOWER = -3;
const TPM_CLOCK_ADJUST TPM_CLOCK_MEDIUM_SLOWER = -2;
const TPM_CLOCK_ADJUST TPM_CLOCK_FINE_SLOWER = -1;
const TPM_CLOCK_ADJUST TPM_CLOCK_NO_CHANGE = 0;
const TPM_CLOCK_ADJUST TPM_CLOCK_FINE_FASTER = 1;
const TPM_CLOCK_ADJUST TPM_CLOCK_MEDIUM_FASTER = 2;
const TPM_CLOCK_ADJUST TPM_CLOCK_COARSE_FASTER = 3;
const TPM_EO TPM_EO_EQ = 0x0000;
const TPM_EO TPM_EO_NEQ = 0x0001;
const TPM_EO TPM_EO_SIGNED_GT = 0x0002;
const TPM_EO TPM_EO_UNSIGNED_GT = 0x0003;
const TPM_EO TPM_EO_SIGNED_LT = 0x0004;
const TPM_EO TPM_EO_UNSIGNED_LT = 0x0005;
const TPM_EO TPM_EO_SIGNED_GE = 0x0006;
const TPM_EO TPM_EO_UNSIGNED_GE = 0x0007;
const TPM_EO TPM_EO_SIGNED_LE = 0x0008;
const TPM_EO TPM_EO_UNSIGNED_LE = 0x0009;
const TPM_EO TPM_EO_BITSET = 0x000A;
const TPM_EO TPM_EO_BITCLEAR = 0x000B;
const TPM_ST TPM_ST_RSP_COMMAND = 0x00C4;
const TPM_ST TPM_ST_NULL = 0X8000;
const TPM_ST TPM_ST_NO_SESSIONS = 0x8001;
const TPM_ST TPM_ST_SESSIONS = 0x8002;
const TPM_ST TPM_ST_ATTEST_NV = 0x8014;
const TPM_ST TPM_ST_ATTEST_COMMAND_AUDIT = 0x8015;
const TPM_ST TPM_ST_ATTEST_SESSION_AUDIT = 0x8016;
const TPM_ST TPM_ST_ATTEST_CERTIFY = 0x8017;
const TPM_ST TPM_ST_ATTEST_QUOTE = 0x8018;
const TPM_ST TPM_ST_ATTEST_TIME = 0x8019;
const TPM_ST TPM_ST_ATTEST_CREATION = 0x801A;
const TPM_ST TPM_ST_CREATION = 0x8021;
const TPM_ST TPM_ST_VERIFIED = 0x8022;
const TPM_ST TPM_ST_AUTH_SECRET = 0x8023;
const TPM_ST TPM_ST_HASHCHECK = 0x8024;
const TPM_ST TPM_ST_AUTH_SIGNED = 0x8025;
const TPM_ST TPM_ST_FU_MANIFEST = 0x8029;
const TPM_SU TPM_SU_CLEAR = 0x0000;
const TPM_SU TPM_SU_STATE = 0x0001;
const TPM_SE TPM_SE_HMAC = 0x00;
const TPM_SE TPM_SE_POLICY = 0x01;
const TPM_SE TPM_SE_TRIAL = 0x03;
const TPM_CAP TPM_CAP_FIRST = 0x00000000;
const TPM_CAP TPM_CAP_ALGS = 0x00000000;
const TPM_CAP TPM_CAP_HANDLES = 0x00000001;
const TPM_CAP TPM_CAP_COMMANDS = 0x00000002;
const TPM_CAP TPM_CAP_PP_COMMANDS = 0x00000003;
const TPM_CAP TPM_CAP_AUDIT_COMMANDS = 0x00000004;
const TPM_CAP TPM_CAP_PCRS = 0x00000005;
const TPM_CAP TPM_CAP_TPM_PROPERTIES = 0x00000006;
const TPM_CAP TPM_CAP_PCR_PROPERTIES = 0x00000007;
const TPM_CAP TPM_CAP_ECC_CURVES = 0x00000008;
const TPM_CAP TPM_CAP_LAST = 0x00000008;
const TPM_CAP TPM_CAP_VENDOR_PROPERTY = 0x00000100;
const TPM_PT TPM_PT_NONE = 0x00000000;
const TPM_PT PT_GROUP = 0x00000100;
const TPM_PT PT_FIXED = PT_GROUP * 1;
const TPM_PT TPM_PT_FAMILY_INDICATOR = PT_FIXED + 0;
const TPM_PT TPM_PT_LEVEL = PT_FIXED + 1;
const TPM_PT TPM_PT_REVISION = PT_FIXED + 2;
const TPM_PT TPM_PT_DAY_OF_YEAR = PT_FIXED + 3;
const TPM_PT TPM_PT_YEAR = PT_FIXED + 4;
const TPM_PT TPM_PT_MANUFACTURER = PT_FIXED + 5;
const TPM_PT TPM_PT_VENDOR_STRING_1 = PT_FIXED + 6;
const TPM_PT TPM_PT_VENDOR_STRING_2 = PT_FIXED + 7;
const TPM_PT TPM_PT_VENDOR_STRING_3 = PT_FIXED + 8;
const TPM_PT TPM_PT_VENDOR_STRING_4 = PT_FIXED + 9;
const TPM_PT TPM_PT_VENDOR_TPM_TYPE = PT_FIXED + 10;
const TPM_PT TPM_PT_FIRMWARE_VERSION_1 = PT_FIXED + 11;
const TPM_PT TPM_PT_FIRMWARE_VERSION_2 = PT_FIXED + 12;
const TPM_PT TPM_PT_INPUT_BUFFER = PT_FIXED + 13;
const TPM_PT TPM_PT_HR_TRANSIENT_MIN = PT_FIXED + 14;
const TPM_PT TPM_PT_HR_PERSISTENT_MIN = PT_FIXED + 15;
const TPM_PT TPM_PT_HR_LOADED_MIN = PT_FIXED + 16;
const TPM_PT TPM_PT_ACTIVE_SESSIONS_MAX = PT_FIXED + 17;
const TPM_PT TPM_PT_PCR_COUNT = PT_FIXED + 18;
const TPM_PT TPM_PT_PCR_SELECT_MIN = PT_FIXED + 19;
const TPM_PT TPM_PT_CONTEXT_GAP_MAX = PT_FIXED + 20;
const TPM_PT TPM_PT_NV_COUNTERS_MAX = PT_FIXED + 22;
const TPM_PT TPM_PT_NV_INDEX_MAX = PT_FIXED + 23;
const TPM_PT TPM_PT_MEMORY = PT_FIXED + 24;
const TPM_PT TPM_PT_CLOCK_UPDATE = PT_FIXED + 25;
const TPM_PT TPM_PT_CONTEXT_HASH = PT_FIXED + 26;
const TPM_PT TPM_PT_CONTEXT_SYM = PT_FIXED + 27;
const TPM_PT TPM_PT_CONTEXT_SYM_SIZE = PT_FIXED + 28;
const TPM_PT TPM_PT_ORDERLY_COUNT = PT_FIXED + 29;
const TPM_PT TPM_PT_MAX_COMMAND_SIZE = PT_FIXED + 30;
const TPM_PT TPM_PT_MAX_RESPONSE_SIZE = PT_FIXED + 31;
const TPM_PT TPM_PT_MAX_DIGEST = PT_FIXED + 32;
const TPM_PT TPM_PT_MAX_OBJECT_CONTEXT = PT_FIXED + 33;
const TPM_PT TPM_PT_MAX_SESSION_CONTEXT = PT_FIXED + 34;
const TPM_PT TPM_PT_PS_FAMILY_INDICATOR = PT_FIXED + 35;
const TPM_PT TPM_PT_PS_LEVEL = PT_FIXED + 36;
const TPM_PT TPM_PT_PS_REVISION = PT_FIXED + 37;
const TPM_PT TPM_PT_PS_DAY_OF_YEAR = PT_FIXED + 38;
const TPM_PT TPM_PT_PS_YEAR = PT_FIXED + 39;
const TPM_PT TPM_PT_SPLIT_MAX = PT_FIXED + 40;
const TPM_PT TPM_PT_TOTAL_COMMANDS = PT_FIXED + 41;
const TPM_PT TPM_PT_LIBRARY_COMMANDS = PT_FIXED + 42;
const TPM_PT TPM_PT_VENDOR_COMMANDS = PT_FIXED + 43;
const TPM_PT TPM_PT_NV_BUFFER_MAX = PT_FIXED + 44;
const TPM_PT PT_VAR = PT_GROUP * 2;
const TPM_PT TPM_PT_PERMANENT = PT_VAR + 0;
const TPM_PT TPM_PT_STARTUP_CLEAR = PT_VAR + 1;
const TPM_PT TPM_PT_HR_NV_INDEX = PT_VAR + 2;
const TPM_PT TPM_PT_HR_LOADED = PT_VAR + 3;
const TPM_PT TPM_PT_HR_LOADED_AVAIL = PT_VAR + 4;
const TPM_PT TPM_PT_HR_ACTIVE = PT_VAR + 5;
const TPM_PT TPM_PT_HR_ACTIVE_AVAIL = PT_VAR + 6;
const TPM_PT TPM_PT_HR_TRANSIENT_AVAIL = PT_VAR + 7;
const TPM_PT TPM_PT_HR_PERSISTENT = PT_VAR + 8;
const TPM_PT TPM_PT_HR_PERSISTENT_AVAIL = PT_VAR + 9;
const TPM_PT TPM_PT_NV_COUNTERS = PT_VAR + 10;
const TPM_PT TPM_PT_NV_COUNTERS_AVAIL = PT_VAR + 11;
const TPM_PT TPM_PT_ALGORITHM_SET = PT_VAR + 12;
const TPM_PT TPM_PT_LOADED_CURVES = PT_VAR + 13;
const TPM_PT TPM_PT_LOCKOUT_COUNTER = PT_VAR + 14;
const TPM_PT TPM_PT_MAX_AUTH_FAIL = PT_VAR + 15;
const TPM_PT TPM_PT_LOCKOUT_INTERVAL = PT_VAR + 16;
const TPM_PT TPM_PT_LOCKOUT_RECOVERY = PT_VAR + 17;
const TPM_PT TPM_PT_NV_WRITE_RECOVERY = PT_VAR + 18;
const TPM_PT TPM_PT_AUDIT_COUNTER_0 = PT_VAR + 19;
const TPM_PT TPM_PT_AUDIT_COUNTER_1 = PT_VAR + 20;
const TPM_PT_PCR TPM_PT_PCR_FIRST = 0x00000000;
const TPM_PT_PCR TPM_PT_PCR_SAVE = 0x00000000;
const TPM_PT_PCR TPM_PT_PCR_EXTEND_L0 = 0x00000001;
const TPM_PT_PCR TPM_PT_PCR_RESET_L0 = 0x00000002;
const TPM_PT_PCR TPM_PT_PCR_EXTEND_L1 = 0x00000003;
const TPM_PT_PCR TPM_PT_PCR_RESET_L1 = 0x00000004;
const TPM_PT_PCR TPM_PT_PCR_EXTEND_L2 = 0x00000005;
const TPM_PT_PCR TPM_PT_PCR_RESET_L2 = 0x00000006;
const TPM_PT_PCR TPM_PT_PCR_EXTEND_L3 = 0x00000007;
const TPM_PT_PCR TPM_PT_PCR_RESET_L3 = 0x00000008;
const TPM_PT_PCR TPM_PT_PCR_EXTEND_L4 = 0x00000009;
const TPM_PT_PCR TPM_PT_PCR_RESET_L4 = 0x0000000A;
const TPM_PT_PCR TPM_PT_PCR_NO_INCREMENT = 0x00000011;
const TPM_PT_PCR TPM_PT_PCR_DRTM_RESET = 0x00000012;
const TPM_PT_PCR TPM_PT_PCR_POLICY = 0x00000013;
const TPM_PT_PCR TPM_PT_PCR_AUTH = 0x00000014;
const TPM_PT_PCR TPM_PT_PCR_LAST = 0x00000014;
const TPM_PS TPM_PS_MAIN = 0x00000000;
const TPM_PS TPM_PS_PC = 0x00000001;
const TPM_PS TPM_PS_PDA = 0x00000002;
const TPM_PS TPM_PS_CELL_PHONE = 0x00000003;
const TPM_PS TPM_PS_SERVER = 0x00000004;
const TPM_PS TPM_PS_PERIPHERAL = 0x00000005;
const TPM_PS TPM_PS_TSS = 0x00000006;
const TPM_PS TPM_PS_STORAGE = 0x00000007;
const TPM_PS TPM_PS_AUTHENTICATION = 0x00000008;
const TPM_PS TPM_PS_EMBEDDED = 0x00000009;
const TPM_PS TPM_PS_HARDCOPY = 0x0000000A;
const TPM_PS TPM_PS_INFRASTRUCTURE = 0x0000000B;
const TPM_PS TPM_PS_VIRTUALIZATION = 0x0000000C;
const TPM_PS TPM_PS_TNC = 0x0000000D;
const TPM_PS TPM_PS_MULTI_TENANT = 0x0000000E;
const TPM_PS TPM_PS_TC = 0x0000000F;
const TPM_HT TPM_HT_PCR = 0x00;
const TPM_HT TPM_HT_NV_INDEX = 0x01;
const TPM_HT TPM_HT_HMAC_SESSION = 0x02;
const TPM_HT TPM_HT_LOADED_SESSION = 0x02;
const TPM_HT TPM_HT_POLICY_SESSION = 0x03;
const TPM_HT TPM_HT_ACTIVE_SESSION = 0x03;
const TPM_HT TPM_HT_PERMANENT = 0x40;
const TPM_HT TPM_HT_TRANSIENT = 0x80;
const TPM_HT TPM_HT_PERSISTENT = 0x81;
const TPM_RH TPM_RH_FIRST = 0x40000000;
const TPM_RH TPM_RH_SRK = 0x40000000;
const TPM_RH TPM_RH_OWNER = 0x40000001;
const TPM_RH TPM_RH_REVOKE = 0x40000002;
const TPM_RH TPM_RH_TRANSPORT = 0x40000003;
const TPM_RH TPM_RH_OPERATOR = 0x40000004;
const TPM_RH TPM_RH_ADMIN = 0x40000005;
const TPM_RH TPM_RH_EK = 0x40000006;
const TPM_RH TPM_RH_NULL = 0x40000007;
const TPM_RH TPM_RH_UNASSIGNED = 0x40000008;
const TPM_RH TPM_RS_PW = 0x40000009;
const TPM_RH TPM_RH_LOCKOUT = 0x4000000A;
const TPM_RH TPM_RH_ENDORSEMENT = 0x4000000B;
const TPM_RH TPM_RH_PLATFORM = 0x4000000C;
const TPM_RH TPM_RH_PLATFORM_NV = 0x4000000D;
const TPM_RH TPM_RH_LAST = 0x4000000D;
const TPM_HC HR_HANDLE_MASK = 0x00FFFFFF;
const TPM_HC HR_RANGE_MASK = 0xFF000000;
const TPM_HC HR_SHIFT = 24;
const TPM_HC HR_PCR = (TPM_HT_PCR << HR_SHIFT);
const TPM_HC HR_HMAC_SESSION = (TPM_HT_HMAC_SESSION << HR_SHIFT);
const TPM_HC HR_POLICY_SESSION = (TPM_HT_POLICY_SESSION << HR_SHIFT);
const TPM_HC HR_TRANSIENT = (TPM_HT_TRANSIENT << HR_SHIFT);
const TPM_HC HR_PERSISTENT = (TPM_HT_PERSISTENT << HR_SHIFT);
const TPM_HC HR_NV_INDEX = (TPM_HT_NV_INDEX << HR_SHIFT);
const TPM_HC HR_PERMANENT = (TPM_HT_PERMANENT << HR_SHIFT);
const TPM_HC PCR_FIRST = (HR_PCR + 0);
const TPM_HC PCR_LAST = (PCR_FIRST + IMPLEMENTATION_PCR-1);
const TPM_HC HMAC_SESSION_FIRST = (HR_HMAC_SESSION + 0);
const TPM_HC HMAC_SESSION_LAST = (HMAC_SESSION_FIRST+MAX_ACTIVE_SESSIONS-1);
const TPM_HC LOADED_SESSION_LAST = HMAC_SESSION_LAST;
const TPM_HC POLICY_SESSION_FIRST = (HR_POLICY_SESSION + 0);
const TPM_HC POLICY_SESSION_LAST = (POLICY_SESSION_FIRST + MAX_ACTIVE_SESSIONS-1);
const TPM_HC TRANSIENT_FIRST = (HR_TRANSIENT + 0);
const TPM_HC ACTIVE_SESSION_FIRST = POLICY_SESSION_FIRST;
const TPM_HC ACTIVE_SESSION_LAST = POLICY_SESSION_LAST;
const TPM_HC TRANSIENT_LAST = (TRANSIENT_FIRST+MAX_LOADED_OBJECTS-1);
const TPM_HC PERSISTENT_FIRST = (HR_PERSISTENT + 0);
const TPM_HC PERSISTENT_LAST = (PERSISTENT_FIRST + 0x00FFFFFF);
const TPM_HC PLATFORM_PERSISTENT = (PERSISTENT_FIRST + 0x00800000);
const TPM_HC NV_INDEX_FIRST = (HR_NV_INDEX + 0);
const TPM_HC NV_INDEX_LAST = (NV_INDEX_FIRST + 0x00FFFFFF);
const TPM_HC PERMANENT_FIRST = TPM_RH_FIRST;
const TPM_HC PERMANENT_LAST = TPM_RH_LAST;
struct TPMS_ALGORITHM_DESCRIPTION {
TPM_ALG_ID alg;
TPMA_ALGORITHM attributes;
};
union TPMU_HA {
BYTE sha1[SHA1_DIGEST_SIZE];
BYTE sha256[SHA256_DIGEST_SIZE];
BYTE sm3_256[SM3_256_DIGEST_SIZE];
BYTE sha384[SHA384_DIGEST_SIZE];
BYTE sha512[SHA512_DIGEST_SIZE];
};
struct TPMT_HA {
TPMI_ALG_HASH hash_alg;
TPMU_HA digest;
};
struct TPM2B_DIGEST {
UINT16 size;
BYTE buffer[sizeof(TPMU_HA)];
};
struct TPM2B_DATA {
UINT16 size;
BYTE buffer[sizeof(TPMT_HA)];
};
struct TPM2B_EVENT {
UINT16 size;
BYTE buffer[1024];
};
struct TPM2B_MAX_BUFFER {
UINT16 size;
BYTE buffer[MAX_DIGEST_BUFFER];
};
struct TPM2B_MAX_NV_BUFFER {
UINT16 size;
BYTE buffer[MAX_NV_BUFFER_SIZE];
};
struct TPM2B_TIMEOUT {
UINT16 size;
BYTE buffer[sizeof(UINT64)];
};
struct TPM2B_IV {
UINT16 size;
BYTE buffer[MAX_SYM_BLOCK_SIZE];
};
union TPMU_NAME {
TPMT_HA digest;
TPM_HANDLE handle;
};
struct TPM2B_NAME {
UINT16 size;
BYTE name[sizeof(TPMU_NAME)];
};
struct TPMS_PCR_SELECT {
UINT8 sizeof_select;
BYTE pcr_select[PCR_SELECT_MAX];
};
struct TPMS_PCR_SELECTION {
TPMI_ALG_HASH hash;
UINT8 sizeof_select;
BYTE pcr_select[PCR_SELECT_MAX];
};
struct TPMT_TK_CREATION {
TPM_ST tag;
TPMI_RH_HIERARCHY hierarchy;
TPM2B_DIGEST digest;
};
struct TPMT_TK_VERIFIED {
TPM_ST tag;
TPMI_RH_HIERARCHY hierarchy;
TPM2B_DIGEST digest;
};
struct TPMT_TK_AUTH {
TPMI_RH_HIERARCHY hierarchy;
TPM2B_DIGEST digest;
};
struct TPMT_TK_HASHCHECK {
TPM_ST tag;
TPMI_RH_HIERARCHY hierarchy;
TPM2B_DIGEST digest;
};
struct TPMS_ALG_PROPERTY {
TPM_ALG_ID alg;
TPMA_ALGORITHM alg_properties;
};
struct TPMS_TAGGED_PROPERTY {
TPM_PT property;
UINT32 value;
};
struct TPMS_TAGGED_PCR_SELECT {
TPM_PT tag;
UINT8 sizeof_select;
BYTE pcr_select[PCR_SELECT_MAX];
};
struct TPML_CC {
UINT32 count;
TPM_CC command_codes[MAX_CAP_CC];
};
struct TPML_CCA {
UINT32 count;
TPMA_CC command_attributes[MAX_CAP_CC];
};
struct TPML_ALG {
UINT32 count;
TPM_ALG_ID algorithms[MAX_ALG_LIST_SIZE];
};
struct TPML_HANDLE {
UINT32 count;
TPM_HANDLE handle[MAX_CAP_HANDLES];
};
struct TPML_DIGEST {
UINT32 count;
TPM2B_DIGEST digests[8];
};
struct TPML_DIGEST_VALUES {
UINT32 count;
TPMT_HA digests[HASH_COUNT];
};
struct TPM2B_DIGEST_VALUES {
UINT16 size;
BYTE buffer[sizeof(TPML_DIGEST_VALUES)];
};
struct TPML_PCR_SELECTION {
UINT32 count;
TPMS_PCR_SELECTION pcr_selections[HASH_COUNT];
};
struct TPML_ALG_PROPERTY {
UINT32 count;
TPMS_ALG_PROPERTY alg_properties[MAX_CAP_ALGS];
};
struct TPML_TAGGED_TPM_PROPERTY {
UINT32 count;
TPMS_TAGGED_PROPERTY tpm_property[MAX_TPM_PROPERTIES];
};
struct TPML_TAGGED_PCR_PROPERTY {
UINT32 count;
TPMS_TAGGED_PCR_SELECT pcr_property[MAX_PCR_PROPERTIES];
};
struct TPML_ECC_CURVE {
UINT32 count;
TPM_ECC_CURVE ecc_curves[MAX_ECC_CURVES];
};
union TPMU_CAPABILITIES {
TPML_ALG_PROPERTY algorithms;
TPML_HANDLE handles;
TPML_CCA command;
TPML_CC pp_commands;
TPML_CC audit_commands;
TPML_PCR_SELECTION assigned_pcr;
TPML_TAGGED_TPM_PROPERTY tpm_properties;
TPML_TAGGED_PCR_PROPERTY pcr_properties;
TPML_ECC_CURVE ecc_curves;
};
struct TPMS_CAPABILITY_DATA {
TPM_CAP capability;
TPMU_CAPABILITIES data;
};
struct TPMS_CLOCK_INFO {
UINT64 clock;
UINT32 reset_count;
UINT32 restart_count;
TPMI_YES_NO safe;
};
struct TPMS_TIME_INFO {
UINT64 time;
TPMS_CLOCK_INFO clock_info;
};
struct TPMS_TIME_ATTEST_INFO {
TPMS_TIME_INFO time;
UINT64 firmware_version;
};
struct TPMS_CERTIFY_INFO {
TPM2B_NAME name;
TPM2B_NAME qualified_name;
};
struct TPMS_QUOTE_INFO {
TPML_PCR_SELECTION pcr_select;
TPM2B_DIGEST pcr_digest;
};
struct TPMS_COMMAND_AUDIT_INFO {
UINT64 audit_counter;
TPM_ALG_ID digest_alg;
TPM2B_DIGEST audit_digest;
TPM2B_DIGEST command_digest;
};
struct TPMS_SESSION_AUDIT_INFO {
TPMI_YES_NO exclusive_session;
TPM2B_DIGEST session_digest;
};
struct TPMS_CREATION_INFO {
TPM2B_NAME object_name;
TPM2B_DIGEST creation_hash;
};
struct TPMS_NV_CERTIFY_INFO {
TPM2B_NAME index_name;
UINT16 offset;
TPM2B_MAX_NV_BUFFER nv_contents;
};
union TPMU_ATTEST {
TPMS_CERTIFY_INFO certify;
TPMS_CREATION_INFO creation;
TPMS_QUOTE_INFO quote;
TPMS_COMMAND_AUDIT_INFO command_audit;
TPMS_SESSION_AUDIT_INFO session_audit;
TPMS_TIME_ATTEST_INFO time;
TPMS_NV_CERTIFY_INFO nv;
};
struct TPMS_ATTEST {
TPM_GENERATED magic;
TPMI_ST_ATTEST type;
TPM2B_NAME qualified_signer;
TPM2B_DATA extra_data;
TPMS_CLOCK_INFO clock_info;
UINT64 firmware_version;
TPMU_ATTEST attested;
};
struct TPM2B_ATTEST {
UINT16 size;
BYTE attestation_data[sizeof(TPMS_ATTEST)];
};
struct TPMS_AUTH_COMMAND {
TPMI_SH_AUTH_SESSION session_handle;
TPM2B_NONCE nonce;
TPMA_SESSION session_attributes;
TPM2B_AUTH hmac;
};
struct TPMS_AUTH_RESPONSE {
TPM2B_NONCE nonce;
TPMA_SESSION session_attributes;
TPM2B_AUTH hmac;
};
union TPMU_SYM_KEY_BITS {
TPMI_AES_KEY_BITS aes;
TPMI_SM4_KEY_BITS sm4;
TPM_KEY_BITS sym;
TPMI_ALG_HASH xor_;
};
union TPMU_SYM_MODE {
TPMI_ALG_SYM_MODE aes;
TPMI_ALG_SYM_MODE sm4;
TPMI_ALG_SYM_MODE sym;
};
union TPMU_SYM_DETAILS {
};
struct TPMT_SYM_DEF {
TPMI_ALG_SYM algorithm;
TPMU_SYM_KEY_BITS key_bits;
TPMU_SYM_MODE mode;
TPMU_SYM_DETAILS details;
};
struct TPMT_SYM_DEF_OBJECT {
TPMI_ALG_SYM_OBJECT algorithm;
TPMU_SYM_KEY_BITS key_bits;
TPMU_SYM_MODE mode;
TPMU_SYM_DETAILS details;
};
struct TPM2B_SYM_KEY {
UINT16 size;
BYTE buffer[MAX_SYM_KEY_BYTES];
};
struct TPMS_SYMCIPHER_PARMS {
TPMT_SYM_DEF_OBJECT sym;
};
struct TPM2B_SENSITIVE_DATA {
UINT16 size;
BYTE buffer[MAX_SYM_DATA];
};
struct TPMS_SENSITIVE_CREATE {
TPM2B_AUTH user_auth;
TPM2B_SENSITIVE_DATA data;
};
struct TPM2B_SENSITIVE_CREATE {
UINT16 size;
TPMS_SENSITIVE_CREATE sensitive;
};
struct TPMS_SCHEME_SIGHASH {
TPMI_ALG_HASH hash_alg;
};
struct TPMS_SCHEME_XOR {
TPMI_ALG_HASH hash_alg;
TPMI_ALG_KDF kdf;
};
union TPMU_SCHEME_KEYEDHASH {
TPMS_SCHEME_HMAC hmac;
TPMS_SCHEME_XOR xor_;
};
struct TPMT_KEYEDHASH_SCHEME {
TPMI_ALG_KEYEDHASH_SCHEME scheme;
TPMU_SCHEME_KEYEDHASH details;
};
struct TPMS_SCHEME_ECDAA {
TPMI_ALG_HASH hash_alg;
UINT16 count;
};
union TPMU_SIG_SCHEME {
TPMS_SCHEME_RSASSA rsassa;
TPMS_SCHEME_RSAPSS rsapss;
TPMS_SCHEME_ECDSA ecdsa;
TPMS_SCHEME_SM2 sm2;
TPMS_SCHEME_ECDAA ecdaa;
TPMS_SCHEME_ECSCHNORR ec_schnorr;
TPMS_SCHEME_HMAC hmac;
TPMS_SCHEME_SIGHASH any;
};
struct TPMT_SIG_SCHEME {
TPMI_ALG_SIG_SCHEME scheme;
TPMU_SIG_SCHEME details;
};
struct TPMS_SCHEME_OAEP {
TPMI_ALG_HASH hash_alg;
};
struct TPMS_SCHEME_ECDH {
TPMI_ALG_HASH hash_alg;
};
struct TPMS_SCHEME_MGF1 {
TPMI_ALG_HASH hash_alg;
};
struct TPMS_SCHEME_KDF1_SP800_56a {
TPMI_ALG_HASH hash_alg;
};
struct TPMS_SCHEME_KDF2 {
TPMI_ALG_HASH hash_alg;
};
struct TPMS_SCHEME_KDF1_SP800_108 {
TPMI_ALG_HASH hash_alg;
};
union TPMU_KDF_SCHEME {
TPMS_SCHEME_MGF1 mgf1;
TPMS_SCHEME_KDF1_SP800_56a kdf1_sp800_56a;
TPMS_SCHEME_KDF2 kdf2;
TPMS_SCHEME_KDF1_SP800_108 kdf1_sp800_108;
};
struct TPMT_KDF_SCHEME {
TPMI_ALG_KDF scheme;
TPMU_KDF_SCHEME details;
};
union TPMU_ASYM_SCHEME {
TPMS_SCHEME_RSASSA rsassa;
TPMS_SCHEME_RSAPSS rsapss;
TPMS_SCHEME_OAEP oaep;
TPMS_SCHEME_ECDSA ecdsa;
TPMS_SCHEME_SM2 sm2;
TPMS_SCHEME_ECDAA ecdaa;
TPMS_SCHEME_ECSCHNORR ec_schnorr;
TPMS_SCHEME_ECDH ecdh;
TPMS_SCHEME_SIGHASH any_sig;
};
struct TPMT_ASYM_SCHEME {
TPMI_ALG_ASYM_SCHEME scheme;
TPMU_ASYM_SCHEME details;
};
struct TPMT_RSA_SCHEME {
TPMI_ALG_RSA_SCHEME scheme;
TPMU_ASYM_SCHEME details;
};
struct TPMT_RSA_DECRYPT {
TPMI_ALG_RSA_DECRYPT scheme;
TPMU_ASYM_SCHEME details;
};
struct TPM2B_PUBLIC_KEY_RSA {
UINT16 size;
BYTE buffer[MAX_RSA_KEY_BYTES];
};
struct TPM2B_PRIVATE_KEY_RSA {
UINT16 size;
BYTE buffer[MAX_RSA_KEY_BYTES/2];
};
struct TPM2B_ECC_PARAMETER {
UINT16 size;
BYTE buffer[MAX_ECC_KEY_BYTES];
};
struct TPMS_ECC_POINT {
TPM2B_ECC_PARAMETER x;
TPM2B_ECC_PARAMETER y;
};
struct TPM2B_ECC_POINT {
UINT16 size;
TPMS_ECC_POINT point;
};
struct TPMT_ECC_SCHEME {
TPMI_ALG_ECC_SCHEME scheme;
TPMU_SIG_SCHEME details;
};
struct TPMS_ALGORITHM_DETAIL_ECC {
TPM_ECC_CURVE curve_id;
UINT16 key_size;
TPMT_KDF_SCHEME kdf;
TPMT_ECC_SCHEME sign;
TPM2B_ECC_PARAMETER p;
TPM2B_ECC_PARAMETER a;
TPM2B_ECC_PARAMETER b;
TPM2B_ECC_PARAMETER g_x;
TPM2B_ECC_PARAMETER g_y;
TPM2B_ECC_PARAMETER n;
TPM2B_ECC_PARAMETER h;
};
struct TPMS_SIGNATURE_RSASSA {
TPMI_ALG_HASH hash;
TPM2B_PUBLIC_KEY_RSA sig;
};
struct TPMS_SIGNATURE_RSAPSS {
TPMI_ALG_HASH hash;
TPM2B_PUBLIC_KEY_RSA sig;
};
struct TPMS_SIGNATURE_ECDSA {
TPMI_ALG_HASH hash;
TPM2B_ECC_PARAMETER signature_r;
TPM2B_ECC_PARAMETER signature_s;
};
union TPMU_SIGNATURE {
TPMS_SIGNATURE_RSASSA rsassa;
TPMS_SIGNATURE_RSAPSS rsapss;
TPMS_SIGNATURE_ECDSA ecdsa;
TPMS_SIGNATURE_ECDSA sm2;
TPMS_SIGNATURE_ECDSA ecdaa;
TPMS_SIGNATURE_ECDSA ecschnorr;
TPMT_HA hmac;
TPMS_SCHEME_SIGHASH any;
};
struct TPMT_SIGNATURE {
TPMI_ALG_SIG_SCHEME sig_alg;
TPMU_SIGNATURE signature;
};
union TPMU_ENCRYPTED_SECRET {
BYTE ecc[sizeof(TPMS_ECC_POINT)];
BYTE rsa[MAX_RSA_KEY_BYTES];
BYTE symmetric[sizeof(TPM2B_DIGEST)];
BYTE keyed_hash[sizeof(TPM2B_DIGEST)];
};
struct TPM2B_ENCRYPTED_SECRET {
UINT16 size;
BYTE secret[sizeof(TPMU_ENCRYPTED_SECRET)];
};
struct TPMS_KEYEDHASH_PARMS {
TPMT_KEYEDHASH_SCHEME scheme;
};
struct TPMS_ASYM_PARMS {
TPMT_SYM_DEF_OBJECT symmetric;
TPMT_ASYM_SCHEME scheme;
};
struct TPMS_RSA_PARMS {
TPMT_SYM_DEF_OBJECT symmetric;
TPMT_RSA_SCHEME scheme;
TPMI_RSA_KEY_BITS key_bits;
UINT32 exponent;
};
struct TPMS_ECC_PARMS {
TPMT_SYM_DEF_OBJECT symmetric;
TPMT_ECC_SCHEME scheme;
TPMI_ECC_CURVE curve_id;
TPMT_KDF_SCHEME kdf;
};
union TPMU_PUBLIC_PARMS {
TPMS_KEYEDHASH_PARMS keyed_hash_detail;
TPMS_SYMCIPHER_PARMS sym_detail;
TPMS_RSA_PARMS rsa_detail;
TPMS_ECC_PARMS ecc_detail;
TPMS_ASYM_PARMS asym_detail;
};
struct TPMT_PUBLIC_PARMS {
TPMI_ALG_PUBLIC type;
TPMU_PUBLIC_PARMS parameters;
};
union TPMU_PUBLIC_ID {
TPM2B_DIGEST keyed_hash;
TPM2B_DIGEST sym;
TPM2B_PUBLIC_KEY_RSA rsa;
TPMS_ECC_POINT ecc;
};
struct TPMT_PUBLIC {
TPMI_ALG_PUBLIC type;
TPMI_ALG_HASH name_alg;
TPMA_OBJECT object_attributes;
TPM2B_DIGEST auth_policy;
TPMU_PUBLIC_ID unique;
};
struct TPM2B_PUBLIC {
UINT16 size;
TPMT_PUBLIC public_area;
};
struct TPM2B_PRIVATE_VENDOR_SPECIFIC {
UINT16 size;
BYTE buffer[PRIVATE_VENDOR_SPECIFIC_BYTES];
};
union TPMU_SENSITIVE_COMPOSITE {
TPM2B_PRIVATE_KEY_RSA rsa;
TPM2B_ECC_PARAMETER ecc;
TPM2B_SENSITIVE_DATA bits;
TPM2B_SYM_KEY sym;
TPM2B_PRIVATE_VENDOR_SPECIFIC any;
};
struct TPMT_SENSITIVE {
TPMI_ALG_PUBLIC sensitive_type;
TPM2B_AUTH auth_value;
TPM2B_DIGEST seed_value;
TPMU_SENSITIVE_COMPOSITE sensitive;
};
struct TPM2B_SENSITIVE {
UINT16 size;
TPMT_SENSITIVE sensitive_area;
};
struct _PRIVATE {
TPM2B_DIGEST integrity_outer;
TPM2B_DIGEST integrity_inner;
TPMT_SENSITIVE sensitive;
};
struct TPM2B_PRIVATE {
UINT16 size;
BYTE buffer[sizeof(_PRIVATE)];
};
struct _ID_OBJECT {
TPM2B_DIGEST integrity_hmac;
TPM2B_DIGEST enc_identity;
};
struct TPM2B_ID_OBJECT {
UINT16 size;
BYTE credential[sizeof(_ID_OBJECT)];
};
struct TPMS_NV_PUBLIC {
TPMI_RH_NV_INDEX nv_index;
TPMI_ALG_HASH name_alg;
TPMA_NV attributes;
TPM2B_DIGEST auth_policy;
UINT16 data_size;
};
struct TPM2B_NV_PUBLIC {
UINT16 size;
TPMS_NV_PUBLIC nv_public;
};
struct TPM2B_CONTEXT_SENSITIVE {
UINT16 size;
BYTE buffer[MAX_CONTEXT_SIZE];
};
struct TPMS_CONTEXT_DATA {
TPM2B_DIGEST integrity;
TPM2B_CONTEXT_SENSITIVE encrypted;
};
struct TPM2B_CONTEXT_DATA {
UINT16 size;
BYTE buffer[sizeof(TPMS_CONTEXT_DATA)];
};
struct TPMS_CONTEXT {
UINT64 sequence;
TPMI_DH_CONTEXT saved_handle;
TPMI_RH_HIERARCHY hierarchy;
TPM2B_CONTEXT_DATA context_blob;
};
struct TPMS_CREATION_DATA {
TPML_PCR_SELECTION pcr_select;
TPM2B_DIGEST pcr_digest;
TPMA_LOCALITY locality;
TPM_ALG_ID parent_name_alg;
TPM2B_NAME parent_name;
TPM2B_NAME parent_qualified_name;
TPM2B_DATA outside_info;
};
struct TPM2B_CREATION_DATA {
UINT16 size;
TPMS_CREATION_DATA creation_data;
};
TPM_RC Serialize_uint8_t(
const uint8_t& value,
std::string* buffer);
TPM_RC Parse_uint8_t(
std::string* buffer,
uint8_t* value,
std::string* value_bytes);
TPM_RC Serialize_int8_t(
const int8_t& value,
std::string* buffer);
TPM_RC Parse_int8_t(
std::string* buffer,
int8_t* value,
std::string* value_bytes);
TPM_RC Serialize_int(
const int& value,
std::string* buffer);
TPM_RC Parse_int(
std::string* buffer,
int* value,
std::string* value_bytes);
TPM_RC Serialize_uint16_t(
const uint16_t& value,
std::string* buffer);
TPM_RC Parse_uint16_t(
std::string* buffer,
uint16_t* value,
std::string* value_bytes);
TPM_RC Serialize_int16_t(
const int16_t& value,
std::string* buffer);
TPM_RC Parse_int16_t(
std::string* buffer,
int16_t* value,
std::string* value_bytes);
TPM_RC Serialize_uint32_t(
const uint32_t& value,
std::string* buffer);
TPM_RC Parse_uint32_t(
std::string* buffer,
uint32_t* value,
std::string* value_bytes);
TPM_RC Serialize_int32_t(
const int32_t& value,
std::string* buffer);
TPM_RC Parse_int32_t(
std::string* buffer,
int32_t* value,
std::string* value_bytes);
TPM_RC Serialize_uint64_t(
const uint64_t& value,
std::string* buffer);
TPM_RC Parse_uint64_t(
std::string* buffer,
uint64_t* value,
std::string* value_bytes);
TPM_RC Serialize_int64_t(
const int64_t& value,
std::string* buffer);
TPM_RC Parse_int64_t(
std::string* buffer,
int64_t* value,
std::string* value_bytes);
TPM_RC Serialize_UINT8(
const UINT8& value,
std::string* buffer);
TPM_RC Parse_UINT8(
std::string* buffer,
UINT8* value,
std::string* value_bytes);
TPM_RC Serialize_BYTE(
const BYTE& value,
std::string* buffer);
TPM_RC Parse_BYTE(
std::string* buffer,
BYTE* value,
std::string* value_bytes);
TPM_RC Serialize_INT8(
const INT8& value,
std::string* buffer);
TPM_RC Parse_INT8(
std::string* buffer,
INT8* value,
std::string* value_bytes);
TPM_RC Serialize_BOOL(
const BOOL& value,
std::string* buffer);
TPM_RC Parse_BOOL(
std::string* buffer,
BOOL* value,
std::string* value_bytes);
TPM_RC Serialize_UINT16(
const UINT16& value,
std::string* buffer);
TPM_RC Parse_UINT16(
std::string* buffer,
UINT16* value,
std::string* value_bytes);
TPM_RC Serialize_INT16(
const INT16& value,
std::string* buffer);
TPM_RC Parse_INT16(
std::string* buffer,
INT16* value,
std::string* value_bytes);
TPM_RC Serialize_UINT32(
const UINT32& value,
std::string* buffer);
TPM_RC Parse_UINT32(
std::string* buffer,
UINT32* value,
std::string* value_bytes);
TPM_RC Serialize_INT32(
const INT32& value,
std::string* buffer);
TPM_RC Parse_INT32(
std::string* buffer,
INT32* value,
std::string* value_bytes);
TPM_RC Serialize_UINT64(
const UINT64& value,
std::string* buffer);
TPM_RC Parse_UINT64(
std::string* buffer,
UINT64* value,
std::string* value_bytes);
TPM_RC Serialize_INT64(
const INT64& value,
std::string* buffer);
TPM_RC Parse_INT64(
std::string* buffer,
INT64* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_ALGORITHM_ID(
const TPM_ALGORITHM_ID& value,
std::string* buffer);
TPM_RC Parse_TPM_ALGORITHM_ID(
std::string* buffer,
TPM_ALGORITHM_ID* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_MODIFIER_INDICATOR(
const TPM_MODIFIER_INDICATOR& value,
std::string* buffer);
TPM_RC Parse_TPM_MODIFIER_INDICATOR(
std::string* buffer,
TPM_MODIFIER_INDICATOR* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_AUTHORIZATION_SIZE(
const TPM_AUTHORIZATION_SIZE& value,
std::string* buffer);
TPM_RC Parse_TPM_AUTHORIZATION_SIZE(
std::string* buffer,
TPM_AUTHORIZATION_SIZE* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_PARAMETER_SIZE(
const TPM_PARAMETER_SIZE& value,
std::string* buffer);
TPM_RC Parse_TPM_PARAMETER_SIZE(
std::string* buffer,
TPM_PARAMETER_SIZE* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_KEY_SIZE(
const TPM_KEY_SIZE& value,
std::string* buffer);
TPM_RC Parse_TPM_KEY_SIZE(
std::string* buffer,
TPM_KEY_SIZE* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_KEY_BITS(
const TPM_KEY_BITS& value,
std::string* buffer);
TPM_RC Parse_TPM_KEY_BITS(
std::string* buffer,
TPM_KEY_BITS* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_HANDLE(
const TPM_HANDLE& value,
std::string* buffer);
TPM_RC Parse_TPM_HANDLE(
std::string* buffer,
TPM_HANDLE* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_NONCE(
const TPM2B_NONCE& value,
std::string* buffer);
TPM_RC Parse_TPM2B_NONCE(
std::string* buffer,
TPM2B_NONCE* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_AUTH(
const TPM2B_AUTH& value,
std::string* buffer);
TPM_RC Parse_TPM2B_AUTH(
std::string* buffer,
TPM2B_AUTH* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_OPERAND(
const TPM2B_OPERAND& value,
std::string* buffer);
TPM_RC Parse_TPM2B_OPERAND(
std::string* buffer,
TPM2B_OPERAND* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_HMAC(
const TPMS_SCHEME_HMAC& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_HMAC(
std::string* buffer,
TPMS_SCHEME_HMAC* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_RSASSA(
const TPMS_SCHEME_RSASSA& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_RSASSA(
std::string* buffer,
TPMS_SCHEME_RSASSA* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_RSAPSS(
const TPMS_SCHEME_RSAPSS& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_RSAPSS(
std::string* buffer,
TPMS_SCHEME_RSAPSS* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_ECDSA(
const TPMS_SCHEME_ECDSA& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_ECDSA(
std::string* buffer,
TPMS_SCHEME_ECDSA* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_SM2(
const TPMS_SCHEME_SM2& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_SM2(
std::string* buffer,
TPMS_SCHEME_SM2* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_ECSCHNORR(
const TPMS_SCHEME_ECSCHNORR& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_ECSCHNORR(
std::string* buffer,
TPMS_SCHEME_ECSCHNORR* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_YES_NO(
const TPMI_YES_NO& value,
std::string* buffer);
TPM_RC Parse_TPMI_YES_NO(
std::string* buffer,
TPMI_YES_NO* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_DH_OBJECT(
const TPMI_DH_OBJECT& value,
std::string* buffer);
TPM_RC Parse_TPMI_DH_OBJECT(
std::string* buffer,
TPMI_DH_OBJECT* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_DH_PERSISTENT(
const TPMI_DH_PERSISTENT& value,
std::string* buffer);
TPM_RC Parse_TPMI_DH_PERSISTENT(
std::string* buffer,
TPMI_DH_PERSISTENT* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_DH_ENTITY(
const TPMI_DH_ENTITY& value,
std::string* buffer);
TPM_RC Parse_TPMI_DH_ENTITY(
std::string* buffer,
TPMI_DH_ENTITY* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_DH_PCR(
const TPMI_DH_PCR& value,
std::string* buffer);
TPM_RC Parse_TPMI_DH_PCR(
std::string* buffer,
TPMI_DH_PCR* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_SH_AUTH_SESSION(
const TPMI_SH_AUTH_SESSION& value,
std::string* buffer);
TPM_RC Parse_TPMI_SH_AUTH_SESSION(
std::string* buffer,
TPMI_SH_AUTH_SESSION* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_SH_HMAC(
const TPMI_SH_HMAC& value,
std::string* buffer);
TPM_RC Parse_TPMI_SH_HMAC(
std::string* buffer,
TPMI_SH_HMAC* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_SH_POLICY(
const TPMI_SH_POLICY& value,
std::string* buffer);
TPM_RC Parse_TPMI_SH_POLICY(
std::string* buffer,
TPMI_SH_POLICY* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_DH_CONTEXT(
const TPMI_DH_CONTEXT& value,
std::string* buffer);
TPM_RC Parse_TPMI_DH_CONTEXT(
std::string* buffer,
TPMI_DH_CONTEXT* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_RH_HIERARCHY(
const TPMI_RH_HIERARCHY& value,
std::string* buffer);
TPM_RC Parse_TPMI_RH_HIERARCHY(
std::string* buffer,
TPMI_RH_HIERARCHY* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_RH_ENABLES(
const TPMI_RH_ENABLES& value,
std::string* buffer);
TPM_RC Parse_TPMI_RH_ENABLES(
std::string* buffer,
TPMI_RH_ENABLES* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_RH_HIERARCHY_AUTH(
const TPMI_RH_HIERARCHY_AUTH& value,
std::string* buffer);
TPM_RC Parse_TPMI_RH_HIERARCHY_AUTH(
std::string* buffer,
TPMI_RH_HIERARCHY_AUTH* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_RH_PLATFORM(
const TPMI_RH_PLATFORM& value,
std::string* buffer);
TPM_RC Parse_TPMI_RH_PLATFORM(
std::string* buffer,
TPMI_RH_PLATFORM* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_RH_OWNER(
const TPMI_RH_OWNER& value,
std::string* buffer);
TPM_RC Parse_TPMI_RH_OWNER(
std::string* buffer,
TPMI_RH_OWNER* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_RH_ENDORSEMENT(
const TPMI_RH_ENDORSEMENT& value,
std::string* buffer);
TPM_RC Parse_TPMI_RH_ENDORSEMENT(
std::string* buffer,
TPMI_RH_ENDORSEMENT* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_RH_PROVISION(
const TPMI_RH_PROVISION& value,
std::string* buffer);
TPM_RC Parse_TPMI_RH_PROVISION(
std::string* buffer,
TPMI_RH_PROVISION* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_RH_CLEAR(
const TPMI_RH_CLEAR& value,
std::string* buffer);
TPM_RC Parse_TPMI_RH_CLEAR(
std::string* buffer,
TPMI_RH_CLEAR* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_RH_NV_AUTH(
const TPMI_RH_NV_AUTH& value,
std::string* buffer);
TPM_RC Parse_TPMI_RH_NV_AUTH(
std::string* buffer,
TPMI_RH_NV_AUTH* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_RH_LOCKOUT(
const TPMI_RH_LOCKOUT& value,
std::string* buffer);
TPM_RC Parse_TPMI_RH_LOCKOUT(
std::string* buffer,
TPMI_RH_LOCKOUT* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_RH_NV_INDEX(
const TPMI_RH_NV_INDEX& value,
std::string* buffer);
TPM_RC Parse_TPMI_RH_NV_INDEX(
std::string* buffer,
TPMI_RH_NV_INDEX* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_HASH(
const TPMI_ALG_HASH& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_HASH(
std::string* buffer,
TPMI_ALG_HASH* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_ASYM(
const TPMI_ALG_ASYM& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_ASYM(
std::string* buffer,
TPMI_ALG_ASYM* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_SYM(
const TPMI_ALG_SYM& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_SYM(
std::string* buffer,
TPMI_ALG_SYM* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_SYM_OBJECT(
const TPMI_ALG_SYM_OBJECT& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_SYM_OBJECT(
std::string* buffer,
TPMI_ALG_SYM_OBJECT* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_SYM_MODE(
const TPMI_ALG_SYM_MODE& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_SYM_MODE(
std::string* buffer,
TPMI_ALG_SYM_MODE* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_KDF(
const TPMI_ALG_KDF& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_KDF(
std::string* buffer,
TPMI_ALG_KDF* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_SIG_SCHEME(
const TPMI_ALG_SIG_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_SIG_SCHEME(
std::string* buffer,
TPMI_ALG_SIG_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ECC_KEY_EXCHANGE(
const TPMI_ECC_KEY_EXCHANGE& value,
std::string* buffer);
TPM_RC Parse_TPMI_ECC_KEY_EXCHANGE(
std::string* buffer,
TPMI_ECC_KEY_EXCHANGE* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ST_COMMAND_TAG(
const TPMI_ST_COMMAND_TAG& value,
std::string* buffer);
TPM_RC Parse_TPMI_ST_COMMAND_TAG(
std::string* buffer,
TPMI_ST_COMMAND_TAG* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ST_ATTEST(
const TPMI_ST_ATTEST& value,
std::string* buffer);
TPM_RC Parse_TPMI_ST_ATTEST(
std::string* buffer,
TPMI_ST_ATTEST* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_AES_KEY_BITS(
const TPMI_AES_KEY_BITS& value,
std::string* buffer);
TPM_RC Parse_TPMI_AES_KEY_BITS(
std::string* buffer,
TPMI_AES_KEY_BITS* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_SM4_KEY_BITS(
const TPMI_SM4_KEY_BITS& value,
std::string* buffer);
TPM_RC Parse_TPMI_SM4_KEY_BITS(
std::string* buffer,
TPMI_SM4_KEY_BITS* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_KEYEDHASH_SCHEME(
const TPMI_ALG_KEYEDHASH_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_KEYEDHASH_SCHEME(
std::string* buffer,
TPMI_ALG_KEYEDHASH_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_ASYM_SCHEME(
const TPMI_ALG_ASYM_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_ASYM_SCHEME(
std::string* buffer,
TPMI_ALG_ASYM_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_RSA_SCHEME(
const TPMI_ALG_RSA_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_RSA_SCHEME(
std::string* buffer,
TPMI_ALG_RSA_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_RSA_DECRYPT(
const TPMI_ALG_RSA_DECRYPT& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_RSA_DECRYPT(
std::string* buffer,
TPMI_ALG_RSA_DECRYPT* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_RSA_KEY_BITS(
const TPMI_RSA_KEY_BITS& value,
std::string* buffer);
TPM_RC Parse_TPMI_RSA_KEY_BITS(
std::string* buffer,
TPMI_RSA_KEY_BITS* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_ECC_SCHEME(
const TPMI_ALG_ECC_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_ECC_SCHEME(
std::string* buffer,
TPMI_ALG_ECC_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ECC_CURVE(
const TPMI_ECC_CURVE& value,
std::string* buffer);
TPM_RC Parse_TPMI_ECC_CURVE(
std::string* buffer,
TPMI_ECC_CURVE* value,
std::string* value_bytes);
TPM_RC Serialize_TPMI_ALG_PUBLIC(
const TPMI_ALG_PUBLIC& value,
std::string* buffer);
TPM_RC Parse_TPMI_ALG_PUBLIC(
std::string* buffer,
TPMI_ALG_PUBLIC* value,
std::string* value_bytes);
TPM_RC Serialize_TPMA_ALGORITHM(
const TPMA_ALGORITHM& value,
std::string* buffer);
TPM_RC Parse_TPMA_ALGORITHM(
std::string* buffer,
TPMA_ALGORITHM* value,
std::string* value_bytes);
TPM_RC Serialize_TPMA_OBJECT(
const TPMA_OBJECT& value,
std::string* buffer);
TPM_RC Parse_TPMA_OBJECT(
std::string* buffer,
TPMA_OBJECT* value,
std::string* value_bytes);
TPM_RC Serialize_TPMA_SESSION(
const TPMA_SESSION& value,
std::string* buffer);
TPM_RC Parse_TPMA_SESSION(
std::string* buffer,
TPMA_SESSION* value,
std::string* value_bytes);
TPM_RC Serialize_TPMA_LOCALITY(
const TPMA_LOCALITY& value,
std::string* buffer);
TPM_RC Parse_TPMA_LOCALITY(
std::string* buffer,
TPMA_LOCALITY* value,
std::string* value_bytes);
TPM_RC Serialize_TPMA_PERMANENT(
const TPMA_PERMANENT& value,
std::string* buffer);
TPM_RC Parse_TPMA_PERMANENT(
std::string* buffer,
TPMA_PERMANENT* value,
std::string* value_bytes);
TPM_RC Serialize_TPMA_STARTUP_CLEAR(
const TPMA_STARTUP_CLEAR& value,
std::string* buffer);
TPM_RC Parse_TPMA_STARTUP_CLEAR(
std::string* buffer,
TPMA_STARTUP_CLEAR* value,
std::string* value_bytes);
TPM_RC Serialize_TPMA_MEMORY(
const TPMA_MEMORY& value,
std::string* buffer);
TPM_RC Parse_TPMA_MEMORY(
std::string* buffer,
TPMA_MEMORY* value,
std::string* value_bytes);
TPM_RC Serialize_TPMA_CC(
const TPMA_CC& value,
std::string* buffer);
TPM_RC Parse_TPMA_CC(
std::string* buffer,
TPMA_CC* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_NV_INDEX(
const TPM_NV_INDEX& value,
std::string* buffer);
TPM_RC Parse_TPM_NV_INDEX(
std::string* buffer,
TPM_NV_INDEX* value,
std::string* value_bytes);
TPM_RC Serialize_TPMA_NV(
const TPMA_NV& value,
std::string* buffer);
TPM_RC Parse_TPMA_NV(
std::string* buffer,
TPMA_NV* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_SPEC(
const TPM_SPEC& value,
std::string* buffer);
TPM_RC Parse_TPM_SPEC(
std::string* buffer,
TPM_SPEC* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_GENERATED(
const TPM_GENERATED& value,
std::string* buffer);
TPM_RC Parse_TPM_GENERATED(
std::string* buffer,
TPM_GENERATED* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_ALG_ID(
const TPM_ALG_ID& value,
std::string* buffer);
TPM_RC Parse_TPM_ALG_ID(
std::string* buffer,
TPM_ALG_ID* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_ECC_CURVE(
const TPM_ECC_CURVE& value,
std::string* buffer);
TPM_RC Parse_TPM_ECC_CURVE(
std::string* buffer,
TPM_ECC_CURVE* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_CC(
const TPM_CC& value,
std::string* buffer);
TPM_RC Parse_TPM_CC(
std::string* buffer,
TPM_CC* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_RC(
const TPM_RC& value,
std::string* buffer);
TPM_RC Parse_TPM_RC(
std::string* buffer,
TPM_RC* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_CLOCK_ADJUST(
const TPM_CLOCK_ADJUST& value,
std::string* buffer);
TPM_RC Parse_TPM_CLOCK_ADJUST(
std::string* buffer,
TPM_CLOCK_ADJUST* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_EO(
const TPM_EO& value,
std::string* buffer);
TPM_RC Parse_TPM_EO(
std::string* buffer,
TPM_EO* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_ST(
const TPM_ST& value,
std::string* buffer);
TPM_RC Parse_TPM_ST(
std::string* buffer,
TPM_ST* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_SU(
const TPM_SU& value,
std::string* buffer);
TPM_RC Parse_TPM_SU(
std::string* buffer,
TPM_SU* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_SE(
const TPM_SE& value,
std::string* buffer);
TPM_RC Parse_TPM_SE(
std::string* buffer,
TPM_SE* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_CAP(
const TPM_CAP& value,
std::string* buffer);
TPM_RC Parse_TPM_CAP(
std::string* buffer,
TPM_CAP* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_PT(
const TPM_PT& value,
std::string* buffer);
TPM_RC Parse_TPM_PT(
std::string* buffer,
TPM_PT* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_PT_PCR(
const TPM_PT_PCR& value,
std::string* buffer);
TPM_RC Parse_TPM_PT_PCR(
std::string* buffer,
TPM_PT_PCR* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_PS(
const TPM_PS& value,
std::string* buffer);
TPM_RC Parse_TPM_PS(
std::string* buffer,
TPM_PS* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_HT(
const TPM_HT& value,
std::string* buffer);
TPM_RC Parse_TPM_HT(
std::string* buffer,
TPM_HT* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_RH(
const TPM_RH& value,
std::string* buffer);
TPM_RC Parse_TPM_RH(
std::string* buffer,
TPM_RH* value,
std::string* value_bytes);
TPM_RC Serialize_TPM_HC(
const TPM_HC& value,
std::string* buffer);
TPM_RC Parse_TPM_HC(
std::string* buffer,
TPM_HC* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_ALGORITHM_DESCRIPTION(
const TPMS_ALGORITHM_DESCRIPTION& value,
std::string* buffer);
TPM_RC Parse_TPMS_ALGORITHM_DESCRIPTION(
std::string* buffer,
TPMS_ALGORITHM_DESCRIPTION* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_HA(
const TPMT_HA& value,
std::string* buffer);
TPM_RC Parse_TPMT_HA(
std::string* buffer,
TPMT_HA* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_DIGEST(
const TPM2B_DIGEST& value,
std::string* buffer);
TPM_RC Parse_TPM2B_DIGEST(
std::string* buffer,
TPM2B_DIGEST* value,
std::string* value_bytes);
TPM2B_DIGEST Make_TPM2B_DIGEST(
const std::string& bytes);
std::string StringFrom_TPM2B_DIGEST(
const TPM2B_DIGEST& tpm2b);
TPM_RC Serialize_TPM2B_DATA(
const TPM2B_DATA& value,
std::string* buffer);
TPM_RC Parse_TPM2B_DATA(
std::string* buffer,
TPM2B_DATA* value,
std::string* value_bytes);
TPM2B_DATA Make_TPM2B_DATA(
const std::string& bytes);
std::string StringFrom_TPM2B_DATA(
const TPM2B_DATA& tpm2b);
TPM_RC Serialize_TPM2B_EVENT(
const TPM2B_EVENT& value,
std::string* buffer);
TPM_RC Parse_TPM2B_EVENT(
std::string* buffer,
TPM2B_EVENT* value,
std::string* value_bytes);
TPM2B_EVENT Make_TPM2B_EVENT(
const std::string& bytes);
std::string StringFrom_TPM2B_EVENT(
const TPM2B_EVENT& tpm2b);
TPM_RC Serialize_TPM2B_MAX_BUFFER(
const TPM2B_MAX_BUFFER& value,
std::string* buffer);
TPM_RC Parse_TPM2B_MAX_BUFFER(
std::string* buffer,
TPM2B_MAX_BUFFER* value,
std::string* value_bytes);
TPM2B_MAX_BUFFER Make_TPM2B_MAX_BUFFER(
const std::string& bytes);
std::string StringFrom_TPM2B_MAX_BUFFER(
const TPM2B_MAX_BUFFER& tpm2b);
TPM_RC Serialize_TPM2B_MAX_NV_BUFFER(
const TPM2B_MAX_NV_BUFFER& value,
std::string* buffer);
TPM_RC Parse_TPM2B_MAX_NV_BUFFER(
std::string* buffer,
TPM2B_MAX_NV_BUFFER* value,
std::string* value_bytes);
TPM2B_MAX_NV_BUFFER Make_TPM2B_MAX_NV_BUFFER(
const std::string& bytes);
std::string StringFrom_TPM2B_MAX_NV_BUFFER(
const TPM2B_MAX_NV_BUFFER& tpm2b);
TPM_RC Serialize_TPM2B_TIMEOUT(
const TPM2B_TIMEOUT& value,
std::string* buffer);
TPM_RC Parse_TPM2B_TIMEOUT(
std::string* buffer,
TPM2B_TIMEOUT* value,
std::string* value_bytes);
TPM2B_TIMEOUT Make_TPM2B_TIMEOUT(
const std::string& bytes);
std::string StringFrom_TPM2B_TIMEOUT(
const TPM2B_TIMEOUT& tpm2b);
TPM_RC Serialize_TPM2B_IV(
const TPM2B_IV& value,
std::string* buffer);
TPM_RC Parse_TPM2B_IV(
std::string* buffer,
TPM2B_IV* value,
std::string* value_bytes);
TPM2B_IV Make_TPM2B_IV(
const std::string& bytes);
std::string StringFrom_TPM2B_IV(
const TPM2B_IV& tpm2b);
TPM_RC Serialize_TPM2B_NAME(
const TPM2B_NAME& value,
std::string* buffer);
TPM_RC Parse_TPM2B_NAME(
std::string* buffer,
TPM2B_NAME* value,
std::string* value_bytes);
TPM2B_NAME Make_TPM2B_NAME(
const std::string& bytes);
std::string StringFrom_TPM2B_NAME(
const TPM2B_NAME& tpm2b);
TPM_RC Serialize_TPMS_PCR_SELECT(
const TPMS_PCR_SELECT& value,
std::string* buffer);
TPM_RC Parse_TPMS_PCR_SELECT(
std::string* buffer,
TPMS_PCR_SELECT* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_PCR_SELECTION(
const TPMS_PCR_SELECTION& value,
std::string* buffer);
TPM_RC Parse_TPMS_PCR_SELECTION(
std::string* buffer,
TPMS_PCR_SELECTION* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_TK_CREATION(
const TPMT_TK_CREATION& value,
std::string* buffer);
TPM_RC Parse_TPMT_TK_CREATION(
std::string* buffer,
TPMT_TK_CREATION* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_TK_VERIFIED(
const TPMT_TK_VERIFIED& value,
std::string* buffer);
TPM_RC Parse_TPMT_TK_VERIFIED(
std::string* buffer,
TPMT_TK_VERIFIED* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_TK_AUTH(
const TPMT_TK_AUTH& value,
std::string* buffer);
TPM_RC Parse_TPMT_TK_AUTH(
std::string* buffer,
TPMT_TK_AUTH* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_TK_HASHCHECK(
const TPMT_TK_HASHCHECK& value,
std::string* buffer);
TPM_RC Parse_TPMT_TK_HASHCHECK(
std::string* buffer,
TPMT_TK_HASHCHECK* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_ALG_PROPERTY(
const TPMS_ALG_PROPERTY& value,
std::string* buffer);
TPM_RC Parse_TPMS_ALG_PROPERTY(
std::string* buffer,
TPMS_ALG_PROPERTY* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_TAGGED_PROPERTY(
const TPMS_TAGGED_PROPERTY& value,
std::string* buffer);
TPM_RC Parse_TPMS_TAGGED_PROPERTY(
std::string* buffer,
TPMS_TAGGED_PROPERTY* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_TAGGED_PCR_SELECT(
const TPMS_TAGGED_PCR_SELECT& value,
std::string* buffer);
TPM_RC Parse_TPMS_TAGGED_PCR_SELECT(
std::string* buffer,
TPMS_TAGGED_PCR_SELECT* value,
std::string* value_bytes);
TPM_RC Serialize_TPML_CC(
const TPML_CC& value,
std::string* buffer);
TPM_RC Parse_TPML_CC(
std::string* buffer,
TPML_CC* value,
std::string* value_bytes);
TPM_RC Serialize_TPML_CCA(
const TPML_CCA& value,
std::string* buffer);
TPM_RC Parse_TPML_CCA(
std::string* buffer,
TPML_CCA* value,
std::string* value_bytes);
TPM_RC Serialize_TPML_ALG(
const TPML_ALG& value,
std::string* buffer);
TPM_RC Parse_TPML_ALG(
std::string* buffer,
TPML_ALG* value,
std::string* value_bytes);
TPM_RC Serialize_TPML_HANDLE(
const TPML_HANDLE& value,
std::string* buffer);
TPM_RC Parse_TPML_HANDLE(
std::string* buffer,
TPML_HANDLE* value,
std::string* value_bytes);
TPM_RC Serialize_TPML_DIGEST(
const TPML_DIGEST& value,
std::string* buffer);
TPM_RC Parse_TPML_DIGEST(
std::string* buffer,
TPML_DIGEST* value,
std::string* value_bytes);
TPM_RC Serialize_TPML_DIGEST_VALUES(
const TPML_DIGEST_VALUES& value,
std::string* buffer);
TPM_RC Parse_TPML_DIGEST_VALUES(
std::string* buffer,
TPML_DIGEST_VALUES* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_DIGEST_VALUES(
const TPM2B_DIGEST_VALUES& value,
std::string* buffer);
TPM_RC Parse_TPM2B_DIGEST_VALUES(
std::string* buffer,
TPM2B_DIGEST_VALUES* value,
std::string* value_bytes);
TPM2B_DIGEST_VALUES Make_TPM2B_DIGEST_VALUES(
const std::string& bytes);
std::string StringFrom_TPM2B_DIGEST_VALUES(
const TPM2B_DIGEST_VALUES& tpm2b);
TPM_RC Serialize_TPML_PCR_SELECTION(
const TPML_PCR_SELECTION& value,
std::string* buffer);
TPM_RC Parse_TPML_PCR_SELECTION(
std::string* buffer,
TPML_PCR_SELECTION* value,
std::string* value_bytes);
TPM_RC Serialize_TPML_ALG_PROPERTY(
const TPML_ALG_PROPERTY& value,
std::string* buffer);
TPM_RC Parse_TPML_ALG_PROPERTY(
std::string* buffer,
TPML_ALG_PROPERTY* value,
std::string* value_bytes);
TPM_RC Serialize_TPML_TAGGED_TPM_PROPERTY(
const TPML_TAGGED_TPM_PROPERTY& value,
std::string* buffer);
TPM_RC Parse_TPML_TAGGED_TPM_PROPERTY(
std::string* buffer,
TPML_TAGGED_TPM_PROPERTY* value,
std::string* value_bytes);
TPM_RC Serialize_TPML_TAGGED_PCR_PROPERTY(
const TPML_TAGGED_PCR_PROPERTY& value,
std::string* buffer);
TPM_RC Parse_TPML_TAGGED_PCR_PROPERTY(
std::string* buffer,
TPML_TAGGED_PCR_PROPERTY* value,
std::string* value_bytes);
TPM_RC Serialize_TPML_ECC_CURVE(
const TPML_ECC_CURVE& value,
std::string* buffer);
TPM_RC Parse_TPML_ECC_CURVE(
std::string* buffer,
TPML_ECC_CURVE* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_CAPABILITY_DATA(
const TPMS_CAPABILITY_DATA& value,
std::string* buffer);
TPM_RC Parse_TPMS_CAPABILITY_DATA(
std::string* buffer,
TPMS_CAPABILITY_DATA* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_CLOCK_INFO(
const TPMS_CLOCK_INFO& value,
std::string* buffer);
TPM_RC Parse_TPMS_CLOCK_INFO(
std::string* buffer,
TPMS_CLOCK_INFO* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_TIME_INFO(
const TPMS_TIME_INFO& value,
std::string* buffer);
TPM_RC Parse_TPMS_TIME_INFO(
std::string* buffer,
TPMS_TIME_INFO* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_TIME_ATTEST_INFO(
const TPMS_TIME_ATTEST_INFO& value,
std::string* buffer);
TPM_RC Parse_TPMS_TIME_ATTEST_INFO(
std::string* buffer,
TPMS_TIME_ATTEST_INFO* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_CERTIFY_INFO(
const TPMS_CERTIFY_INFO& value,
std::string* buffer);
TPM_RC Parse_TPMS_CERTIFY_INFO(
std::string* buffer,
TPMS_CERTIFY_INFO* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_QUOTE_INFO(
const TPMS_QUOTE_INFO& value,
std::string* buffer);
TPM_RC Parse_TPMS_QUOTE_INFO(
std::string* buffer,
TPMS_QUOTE_INFO* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_COMMAND_AUDIT_INFO(
const TPMS_COMMAND_AUDIT_INFO& value,
std::string* buffer);
TPM_RC Parse_TPMS_COMMAND_AUDIT_INFO(
std::string* buffer,
TPMS_COMMAND_AUDIT_INFO* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SESSION_AUDIT_INFO(
const TPMS_SESSION_AUDIT_INFO& value,
std::string* buffer);
TPM_RC Parse_TPMS_SESSION_AUDIT_INFO(
std::string* buffer,
TPMS_SESSION_AUDIT_INFO* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_CREATION_INFO(
const TPMS_CREATION_INFO& value,
std::string* buffer);
TPM_RC Parse_TPMS_CREATION_INFO(
std::string* buffer,
TPMS_CREATION_INFO* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_NV_CERTIFY_INFO(
const TPMS_NV_CERTIFY_INFO& value,
std::string* buffer);
TPM_RC Parse_TPMS_NV_CERTIFY_INFO(
std::string* buffer,
TPMS_NV_CERTIFY_INFO* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_ATTEST(
const TPMS_ATTEST& value,
std::string* buffer);
TPM_RC Parse_TPMS_ATTEST(
std::string* buffer,
TPMS_ATTEST* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_ATTEST(
const TPM2B_ATTEST& value,
std::string* buffer);
TPM_RC Parse_TPM2B_ATTEST(
std::string* buffer,
TPM2B_ATTEST* value,
std::string* value_bytes);
TPM2B_ATTEST Make_TPM2B_ATTEST(
const std::string& bytes);
std::string StringFrom_TPM2B_ATTEST(
const TPM2B_ATTEST& tpm2b);
TPM_RC Serialize_TPMS_AUTH_COMMAND(
const TPMS_AUTH_COMMAND& value,
std::string* buffer);
TPM_RC Parse_TPMS_AUTH_COMMAND(
std::string* buffer,
TPMS_AUTH_COMMAND* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_AUTH_RESPONSE(
const TPMS_AUTH_RESPONSE& value,
std::string* buffer);
TPM_RC Parse_TPMS_AUTH_RESPONSE(
std::string* buffer,
TPMS_AUTH_RESPONSE* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_SYM_DEF(
const TPMT_SYM_DEF& value,
std::string* buffer);
TPM_RC Parse_TPMT_SYM_DEF(
std::string* buffer,
TPMT_SYM_DEF* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_SYM_DEF_OBJECT(
const TPMT_SYM_DEF_OBJECT& value,
std::string* buffer);
TPM_RC Parse_TPMT_SYM_DEF_OBJECT(
std::string* buffer,
TPMT_SYM_DEF_OBJECT* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_SYM_KEY(
const TPM2B_SYM_KEY& value,
std::string* buffer);
TPM_RC Parse_TPM2B_SYM_KEY(
std::string* buffer,
TPM2B_SYM_KEY* value,
std::string* value_bytes);
TPM2B_SYM_KEY Make_TPM2B_SYM_KEY(
const std::string& bytes);
std::string StringFrom_TPM2B_SYM_KEY(
const TPM2B_SYM_KEY& tpm2b);
TPM_RC Serialize_TPMS_SYMCIPHER_PARMS(
const TPMS_SYMCIPHER_PARMS& value,
std::string* buffer);
TPM_RC Parse_TPMS_SYMCIPHER_PARMS(
std::string* buffer,
TPMS_SYMCIPHER_PARMS* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_SENSITIVE_DATA(
const TPM2B_SENSITIVE_DATA& value,
std::string* buffer);
TPM_RC Parse_TPM2B_SENSITIVE_DATA(
std::string* buffer,
TPM2B_SENSITIVE_DATA* value,
std::string* value_bytes);
TPM2B_SENSITIVE_DATA Make_TPM2B_SENSITIVE_DATA(
const std::string& bytes);
std::string StringFrom_TPM2B_SENSITIVE_DATA(
const TPM2B_SENSITIVE_DATA& tpm2b);
TPM_RC Serialize_TPMS_SENSITIVE_CREATE(
const TPMS_SENSITIVE_CREATE& value,
std::string* buffer);
TPM_RC Parse_TPMS_SENSITIVE_CREATE(
std::string* buffer,
TPMS_SENSITIVE_CREATE* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_SENSITIVE_CREATE(
const TPM2B_SENSITIVE_CREATE& value,
std::string* buffer);
TPM_RC Parse_TPM2B_SENSITIVE_CREATE(
std::string* buffer,
TPM2B_SENSITIVE_CREATE* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_SIGHASH(
const TPMS_SCHEME_SIGHASH& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_SIGHASH(
std::string* buffer,
TPMS_SCHEME_SIGHASH* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_XOR(
const TPMS_SCHEME_XOR& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_XOR(
std::string* buffer,
TPMS_SCHEME_XOR* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_KEYEDHASH_SCHEME(
const TPMT_KEYEDHASH_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMT_KEYEDHASH_SCHEME(
std::string* buffer,
TPMT_KEYEDHASH_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_ECDAA(
const TPMS_SCHEME_ECDAA& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_ECDAA(
std::string* buffer,
TPMS_SCHEME_ECDAA* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_SIG_SCHEME(
const TPMT_SIG_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMT_SIG_SCHEME(
std::string* buffer,
TPMT_SIG_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_OAEP(
const TPMS_SCHEME_OAEP& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_OAEP(
std::string* buffer,
TPMS_SCHEME_OAEP* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_ECDH(
const TPMS_SCHEME_ECDH& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_ECDH(
std::string* buffer,
TPMS_SCHEME_ECDH* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_MGF1(
const TPMS_SCHEME_MGF1& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_MGF1(
std::string* buffer,
TPMS_SCHEME_MGF1* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_KDF1_SP800_56a(
const TPMS_SCHEME_KDF1_SP800_56a& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_KDF1_SP800_56a(
std::string* buffer,
TPMS_SCHEME_KDF1_SP800_56a* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_KDF2(
const TPMS_SCHEME_KDF2& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_KDF2(
std::string* buffer,
TPMS_SCHEME_KDF2* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SCHEME_KDF1_SP800_108(
const TPMS_SCHEME_KDF1_SP800_108& value,
std::string* buffer);
TPM_RC Parse_TPMS_SCHEME_KDF1_SP800_108(
std::string* buffer,
TPMS_SCHEME_KDF1_SP800_108* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_KDF_SCHEME(
const TPMT_KDF_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMT_KDF_SCHEME(
std::string* buffer,
TPMT_KDF_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_ASYM_SCHEME(
const TPMT_ASYM_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMT_ASYM_SCHEME(
std::string* buffer,
TPMT_ASYM_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_RSA_SCHEME(
const TPMT_RSA_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMT_RSA_SCHEME(
std::string* buffer,
TPMT_RSA_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_RSA_DECRYPT(
const TPMT_RSA_DECRYPT& value,
std::string* buffer);
TPM_RC Parse_TPMT_RSA_DECRYPT(
std::string* buffer,
TPMT_RSA_DECRYPT* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_PUBLIC_KEY_RSA(
const TPM2B_PUBLIC_KEY_RSA& value,
std::string* buffer);
TPM_RC Parse_TPM2B_PUBLIC_KEY_RSA(
std::string* buffer,
TPM2B_PUBLIC_KEY_RSA* value,
std::string* value_bytes);
TPM2B_PUBLIC_KEY_RSA Make_TPM2B_PUBLIC_KEY_RSA(
const std::string& bytes);
std::string StringFrom_TPM2B_PUBLIC_KEY_RSA(
const TPM2B_PUBLIC_KEY_RSA& tpm2b);
TPM_RC Serialize_TPM2B_PRIVATE_KEY_RSA(
const TPM2B_PRIVATE_KEY_RSA& value,
std::string* buffer);
TPM_RC Parse_TPM2B_PRIVATE_KEY_RSA(
std::string* buffer,
TPM2B_PRIVATE_KEY_RSA* value,
std::string* value_bytes);
TPM2B_PRIVATE_KEY_RSA Make_TPM2B_PRIVATE_KEY_RSA(
const std::string& bytes);
std::string StringFrom_TPM2B_PRIVATE_KEY_RSA(
const TPM2B_PRIVATE_KEY_RSA& tpm2b);
TPM_RC Serialize_TPM2B_ECC_PARAMETER(
const TPM2B_ECC_PARAMETER& value,
std::string* buffer);
TPM_RC Parse_TPM2B_ECC_PARAMETER(
std::string* buffer,
TPM2B_ECC_PARAMETER* value,
std::string* value_bytes);
TPM2B_ECC_PARAMETER Make_TPM2B_ECC_PARAMETER(
const std::string& bytes);
std::string StringFrom_TPM2B_ECC_PARAMETER(
const TPM2B_ECC_PARAMETER& tpm2b);
TPM_RC Serialize_TPMS_ECC_POINT(
const TPMS_ECC_POINT& value,
std::string* buffer);
TPM_RC Parse_TPMS_ECC_POINT(
std::string* buffer,
TPMS_ECC_POINT* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_ECC_POINT(
const TPM2B_ECC_POINT& value,
std::string* buffer);
TPM_RC Parse_TPM2B_ECC_POINT(
std::string* buffer,
TPM2B_ECC_POINT* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_ECC_SCHEME(
const TPMT_ECC_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMT_ECC_SCHEME(
std::string* buffer,
TPMT_ECC_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_ALGORITHM_DETAIL_ECC(
const TPMS_ALGORITHM_DETAIL_ECC& value,
std::string* buffer);
TPM_RC Parse_TPMS_ALGORITHM_DETAIL_ECC(
std::string* buffer,
TPMS_ALGORITHM_DETAIL_ECC* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SIGNATURE_RSASSA(
const TPMS_SIGNATURE_RSASSA& value,
std::string* buffer);
TPM_RC Parse_TPMS_SIGNATURE_RSASSA(
std::string* buffer,
TPMS_SIGNATURE_RSASSA* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SIGNATURE_RSAPSS(
const TPMS_SIGNATURE_RSAPSS& value,
std::string* buffer);
TPM_RC Parse_TPMS_SIGNATURE_RSAPSS(
std::string* buffer,
TPMS_SIGNATURE_RSAPSS* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_SIGNATURE_ECDSA(
const TPMS_SIGNATURE_ECDSA& value,
std::string* buffer);
TPM_RC Parse_TPMS_SIGNATURE_ECDSA(
std::string* buffer,
TPMS_SIGNATURE_ECDSA* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_SIGNATURE(
const TPMT_SIGNATURE& value,
std::string* buffer);
TPM_RC Parse_TPMT_SIGNATURE(
std::string* buffer,
TPMT_SIGNATURE* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_ENCRYPTED_SECRET(
const TPM2B_ENCRYPTED_SECRET& value,
std::string* buffer);
TPM_RC Parse_TPM2B_ENCRYPTED_SECRET(
std::string* buffer,
TPM2B_ENCRYPTED_SECRET* value,
std::string* value_bytes);
TPM2B_ENCRYPTED_SECRET Make_TPM2B_ENCRYPTED_SECRET(
const std::string& bytes);
std::string StringFrom_TPM2B_ENCRYPTED_SECRET(
const TPM2B_ENCRYPTED_SECRET& tpm2b);
TPM_RC Serialize_TPMS_KEYEDHASH_PARMS(
const TPMS_KEYEDHASH_PARMS& value,
std::string* buffer);
TPM_RC Parse_TPMS_KEYEDHASH_PARMS(
std::string* buffer,
TPMS_KEYEDHASH_PARMS* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_ASYM_PARMS(
const TPMS_ASYM_PARMS& value,
std::string* buffer);
TPM_RC Parse_TPMS_ASYM_PARMS(
std::string* buffer,
TPMS_ASYM_PARMS* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_RSA_PARMS(
const TPMS_RSA_PARMS& value,
std::string* buffer);
TPM_RC Parse_TPMS_RSA_PARMS(
std::string* buffer,
TPMS_RSA_PARMS* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_ECC_PARMS(
const TPMS_ECC_PARMS& value,
std::string* buffer);
TPM_RC Parse_TPMS_ECC_PARMS(
std::string* buffer,
TPMS_ECC_PARMS* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_PUBLIC_PARMS(
const TPMT_PUBLIC_PARMS& value,
std::string* buffer);
TPM_RC Parse_TPMT_PUBLIC_PARMS(
std::string* buffer,
TPMT_PUBLIC_PARMS* value,
std::string* value_bytes);
TPM_RC Serialize_TPMT_PUBLIC(
const TPMT_PUBLIC& value,
std::string* buffer);
TPM_RC Parse_TPMT_PUBLIC(
std::string* buffer,
TPMT_PUBLIC* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_PUBLIC(
const TPM2B_PUBLIC& value,
std::string* buffer);
TPM_RC Parse_TPM2B_PUBLIC(
std::string* buffer,
TPM2B_PUBLIC* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_PRIVATE_VENDOR_SPECIFIC(
const TPM2B_PRIVATE_VENDOR_SPECIFIC& value,
std::string* buffer);
TPM_RC Parse_TPM2B_PRIVATE_VENDOR_SPECIFIC(
std::string* buffer,
TPM2B_PRIVATE_VENDOR_SPECIFIC* value,
std::string* value_bytes);
TPM2B_PRIVATE_VENDOR_SPECIFIC Make_TPM2B_PRIVATE_VENDOR_SPECIFIC(
const std::string& bytes);
std::string StringFrom_TPM2B_PRIVATE_VENDOR_SPECIFIC(
const TPM2B_PRIVATE_VENDOR_SPECIFIC& tpm2b);
TPM_RC Serialize_TPMT_SENSITIVE(
const TPMT_SENSITIVE& value,
std::string* buffer);
TPM_RC Parse_TPMT_SENSITIVE(
std::string* buffer,
TPMT_SENSITIVE* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_SENSITIVE(
const TPM2B_SENSITIVE& value,
std::string* buffer);
TPM_RC Parse_TPM2B_SENSITIVE(
std::string* buffer,
TPM2B_SENSITIVE* value,
std::string* value_bytes);
TPM_RC Serialize__PRIVATE(
const _PRIVATE& value,
std::string* buffer);
TPM_RC Parse__PRIVATE(
std::string* buffer,
_PRIVATE* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_PRIVATE(
const TPM2B_PRIVATE& value,
std::string* buffer);
TPM_RC Parse_TPM2B_PRIVATE(
std::string* buffer,
TPM2B_PRIVATE* value,
std::string* value_bytes);
TPM2B_PRIVATE Make_TPM2B_PRIVATE(
const std::string& bytes);
std::string StringFrom_TPM2B_PRIVATE(
const TPM2B_PRIVATE& tpm2b);
TPM_RC Serialize__ID_OBJECT(
const _ID_OBJECT& value,
std::string* buffer);
TPM_RC Parse__ID_OBJECT(
std::string* buffer,
_ID_OBJECT* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_ID_OBJECT(
const TPM2B_ID_OBJECT& value,
std::string* buffer);
TPM_RC Parse_TPM2B_ID_OBJECT(
std::string* buffer,
TPM2B_ID_OBJECT* value,
std::string* value_bytes);
TPM2B_ID_OBJECT Make_TPM2B_ID_OBJECT(
const std::string& bytes);
std::string StringFrom_TPM2B_ID_OBJECT(
const TPM2B_ID_OBJECT& tpm2b);
TPM_RC Serialize_TPMS_NV_PUBLIC(
const TPMS_NV_PUBLIC& value,
std::string* buffer);
TPM_RC Parse_TPMS_NV_PUBLIC(
std::string* buffer,
TPMS_NV_PUBLIC* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_NV_PUBLIC(
const TPM2B_NV_PUBLIC& value,
std::string* buffer);
TPM_RC Parse_TPM2B_NV_PUBLIC(
std::string* buffer,
TPM2B_NV_PUBLIC* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_CONTEXT_SENSITIVE(
const TPM2B_CONTEXT_SENSITIVE& value,
std::string* buffer);
TPM_RC Parse_TPM2B_CONTEXT_SENSITIVE(
std::string* buffer,
TPM2B_CONTEXT_SENSITIVE* value,
std::string* value_bytes);
TPM2B_CONTEXT_SENSITIVE Make_TPM2B_CONTEXT_SENSITIVE(
const std::string& bytes);
std::string StringFrom_TPM2B_CONTEXT_SENSITIVE(
const TPM2B_CONTEXT_SENSITIVE& tpm2b);
TPM_RC Serialize_TPMS_CONTEXT_DATA(
const TPMS_CONTEXT_DATA& value,
std::string* buffer);
TPM_RC Parse_TPMS_CONTEXT_DATA(
std::string* buffer,
TPMS_CONTEXT_DATA* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_CONTEXT_DATA(
const TPM2B_CONTEXT_DATA& value,
std::string* buffer);
TPM_RC Parse_TPM2B_CONTEXT_DATA(
std::string* buffer,
TPM2B_CONTEXT_DATA* value,
std::string* value_bytes);
TPM2B_CONTEXT_DATA Make_TPM2B_CONTEXT_DATA(
const std::string& bytes);
std::string StringFrom_TPM2B_CONTEXT_DATA(
const TPM2B_CONTEXT_DATA& tpm2b);
TPM_RC Serialize_TPMS_CONTEXT(
const TPMS_CONTEXT& value,
std::string* buffer);
TPM_RC Parse_TPMS_CONTEXT(
std::string* buffer,
TPMS_CONTEXT* value,
std::string* value_bytes);
TPM_RC Serialize_TPMS_CREATION_DATA(
const TPMS_CREATION_DATA& value,
std::string* buffer);
TPM_RC Parse_TPMS_CREATION_DATA(
std::string* buffer,
TPMS_CREATION_DATA* value,
std::string* value_bytes);
TPM_RC Serialize_TPM2B_CREATION_DATA(
const TPM2B_CREATION_DATA& value,
std::string* buffer);
TPM_RC Parse_TPM2B_CREATION_DATA(
std::string* buffer,
TPM2B_CREATION_DATA* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_HA(
const TPMU_HA& value,
std::string* buffer);
TPM_RC Parse_TPMU_HA(
std::string* buffer,
TPMU_HA* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_NAME(
const TPMU_NAME& value,
std::string* buffer);
TPM_RC Parse_TPMU_NAME(
std::string* buffer,
TPMU_NAME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_CAPABILITIES(
const TPMU_CAPABILITIES& value,
std::string* buffer);
TPM_RC Parse_TPMU_CAPABILITIES(
std::string* buffer,
TPMU_CAPABILITIES* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_ATTEST(
const TPMU_ATTEST& value,
std::string* buffer);
TPM_RC Parse_TPMU_ATTEST(
std::string* buffer,
TPMU_ATTEST* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_SYM_KEY_BITS(
const TPMU_SYM_KEY_BITS& value,
std::string* buffer);
TPM_RC Parse_TPMU_SYM_KEY_BITS(
std::string* buffer,
TPMU_SYM_KEY_BITS* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_SYM_MODE(
const TPMU_SYM_MODE& value,
std::string* buffer);
TPM_RC Parse_TPMU_SYM_MODE(
std::string* buffer,
TPMU_SYM_MODE* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_SCHEME_KEYEDHASH(
const TPMU_SCHEME_KEYEDHASH& value,
std::string* buffer);
TPM_RC Parse_TPMU_SCHEME_KEYEDHASH(
std::string* buffer,
TPMU_SCHEME_KEYEDHASH* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_SIG_SCHEME(
const TPMU_SIG_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMU_SIG_SCHEME(
std::string* buffer,
TPMU_SIG_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_KDF_SCHEME(
const TPMU_KDF_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMU_KDF_SCHEME(
std::string* buffer,
TPMU_KDF_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_ASYM_SCHEME(
const TPMU_ASYM_SCHEME& value,
std::string* buffer);
TPM_RC Parse_TPMU_ASYM_SCHEME(
std::string* buffer,
TPMU_ASYM_SCHEME* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_SIGNATURE(
const TPMU_SIGNATURE& value,
std::string* buffer);
TPM_RC Parse_TPMU_SIGNATURE(
std::string* buffer,
TPMU_SIGNATURE* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_ENCRYPTED_SECRET(
const TPMU_ENCRYPTED_SECRET& value,
std::string* buffer);
TPM_RC Parse_TPMU_ENCRYPTED_SECRET(
std::string* buffer,
TPMU_ENCRYPTED_SECRET* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_PUBLIC_ID(
const TPMU_PUBLIC_ID& value,
std::string* buffer);
TPM_RC Parse_TPMU_PUBLIC_ID(
std::string* buffer,
TPMU_PUBLIC_ID* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_PUBLIC_PARMS(
const TPMU_PUBLIC_PARMS& value,
std::string* buffer);
TPM_RC Parse_TPMU_PUBLIC_PARMS(
std::string* buffer,
TPMU_PUBLIC_PARMS* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_SENSITIVE_COMPOSITE(
const TPMU_SENSITIVE_COMPOSITE& value,
std::string* buffer);
TPM_RC Parse_TPMU_SENSITIVE_COMPOSITE(
std::string* buffer,
TPMU_SENSITIVE_COMPOSITE* value,
std::string* value_bytes);
TPM_RC Serialize_TPMU_SYM_DETAILS(
const TPMU_SYM_DETAILS& value,
std::string* buffer);
TPM_RC Parse_TPMU_SYM_DETAILS(
std::string* buffer,
TPMU_SYM_DETAILS* value,
std::string* value_bytes);
class Tpm {
public:
// Does not take ownership of |transceiver|.
explicit Tpm(CommandTransceiver* transceiver) : transceiver_(transceiver) {}
virtual ~Tpm() {}
typedef base::Callback<void(
TPM_RC response_code)> StartupResponse;
virtual void Startup(
TPM_SU startup_type,
AuthorizationDelegate* authorization_delegate,
const StartupResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> ShutdownResponse;
virtual void Shutdown(
TPM_SU shutdown_type,
AuthorizationDelegate* authorization_delegate,
const ShutdownResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> SelfTestResponse;
virtual void SelfTest(
TPMI_YES_NO full_test,
AuthorizationDelegate* authorization_delegate,
const SelfTestResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPML_ALG to_do_list)> IncrementalSelfTestResponse;
virtual void IncrementalSelfTest(
TPML_ALG to_test,
AuthorizationDelegate* authorization_delegate,
const IncrementalSelfTestResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_MAX_BUFFER out_data,
TPM_RC test_result)> GetTestResultResponse;
virtual void GetTestResult(
AuthorizationDelegate* authorization_delegate,
const GetTestResultResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPMI_SH_AUTH_SESSION session_handle,
TPM2B_NONCE nonce_tpm)> StartAuthSessionResponse;
virtual void StartAuthSession(
TPMI_DH_OBJECT tpm_key,
const std::string& tpm_key_name,
TPMI_DH_ENTITY bind,
const std::string& bind_name,
TPM2B_NONCE nonce_caller,
TPM2B_ENCRYPTED_SECRET encrypted_salt,
TPM_SE session_type,
TPMT_SYM_DEF symmetric,
TPMI_ALG_HASH auth_hash,
AuthorizationDelegate* authorization_delegate,
const StartAuthSessionResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyRestartResponse;
virtual void PolicyRestart(
TPMI_SH_POLICY session_handle,
const std::string& session_handle_name,
AuthorizationDelegate* authorization_delegate,
const PolicyRestartResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_PRIVATE out_private,
TPM2B_PUBLIC out_public,
TPM2B_CREATION_DATA creation_data,
TPM2B_DIGEST creation_hash,
TPMT_TK_CREATION creation_ticket)> CreateResponse;
virtual void Create(
TPMI_DH_OBJECT parent_handle,
const std::string& parent_handle_name,
TPM2B_SENSITIVE_CREATE in_sensitive,
TPM2B_PUBLIC in_public,
TPM2B_DATA outside_info,
TPML_PCR_SELECTION creation_pcr,
AuthorizationDelegate* authorization_delegate,
const CreateResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM_HANDLE object_handle,
TPM2B_NAME name)> LoadResponse;
virtual void Load(
TPMI_DH_OBJECT parent_handle,
const std::string& parent_handle_name,
TPM2B_PRIVATE in_private,
TPM2B_PUBLIC in_public,
AuthorizationDelegate* authorization_delegate,
const LoadResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM_HANDLE object_handle,
TPM2B_NAME name)> LoadExternalResponse;
virtual void LoadExternal(
TPMI_RH_HIERARCHY hierarchy,
const std::string& hierarchy_name,
TPM2B_SENSITIVE in_private,
TPM2B_PUBLIC in_public,
AuthorizationDelegate* authorization_delegate,
const LoadExternalResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_PUBLIC out_public,
TPM2B_NAME name,
TPM2B_NAME qualified_name)> ReadPublicResponse;
virtual void ReadPublic(
TPMI_DH_OBJECT object_handle,
const std::string& object_handle_name,
AuthorizationDelegate* authorization_delegate,
const ReadPublicResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_DIGEST cert_info)> ActivateCredentialResponse;
virtual void ActivateCredential(
TPMI_DH_OBJECT activate_handle,
const std::string& activate_handle_name,
TPMI_DH_OBJECT key_handle,
const std::string& key_handle_name,
TPM2B_ID_OBJECT credential_blob,
TPM2B_ENCRYPTED_SECRET secret,
AuthorizationDelegate* authorization_delegate,
const ActivateCredentialResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_ID_OBJECT credential_blob)> MakeCredentialResponse;
virtual void MakeCredential(
TPMI_DH_OBJECT handle,
const std::string& handle_name,
TPM2B_DIGEST credential,
TPM2B_NAME object_name,
AuthorizationDelegate* authorization_delegate,
const MakeCredentialResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_SENSITIVE_DATA out_data)> UnsealResponse;
virtual void Unseal(
TPMI_DH_OBJECT item_handle,
const std::string& item_handle_name,
AuthorizationDelegate* authorization_delegate,
const UnsealResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_PRIVATE out_private)> ObjectChangeAuthResponse;
virtual void ObjectChangeAuth(
TPMI_DH_OBJECT object_handle,
const std::string& object_handle_name,
TPMI_DH_OBJECT parent_handle,
const std::string& parent_handle_name,
TPM2B_AUTH new_auth,
AuthorizationDelegate* authorization_delegate,
const ObjectChangeAuthResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_DATA encryption_key_out,
TPM2B_PRIVATE duplicate)> DuplicateResponse;
virtual void Duplicate(
TPMI_DH_OBJECT object_handle,
const std::string& object_handle_name,
TPMI_DH_OBJECT new_parent_handle,
const std::string& new_parent_handle_name,
TPM2B_DATA encryption_key_in,
TPMT_SYM_DEF_OBJECT symmetric_alg,
AuthorizationDelegate* authorization_delegate,
const DuplicateResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_PRIVATE out_duplicate)> RewrapResponse;
virtual void Rewrap(
TPMI_DH_OBJECT old_parent,
const std::string& old_parent_name,
TPMI_DH_OBJECT new_parent,
const std::string& new_parent_name,
TPM2B_PRIVATE in_duplicate,
TPM2B_NAME name,
AuthorizationDelegate* authorization_delegate,
const RewrapResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_PRIVATE out_private)> ImportResponse;
virtual void Import(
TPMI_DH_OBJECT parent_handle,
const std::string& parent_handle_name,
TPM2B_DATA encryption_key,
TPM2B_PUBLIC object_public,
TPM2B_PRIVATE duplicate,
TPM2B_ENCRYPTED_SECRET in_sym_seed,
TPMT_SYM_DEF_OBJECT symmetric_alg,
AuthorizationDelegate* authorization_delegate,
const ImportResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_PUBLIC_KEY_RSA out_data)> RSA_EncryptResponse;
virtual void RSA_Encrypt(
TPMI_DH_OBJECT key_handle,
const std::string& key_handle_name,
TPM2B_PUBLIC_KEY_RSA message,
TPMT_RSA_DECRYPT in_scheme,
TPM2B_DATA label,
AuthorizationDelegate* authorization_delegate,
const RSA_EncryptResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_PUBLIC_KEY_RSA message)> RSA_DecryptResponse;
virtual void RSA_Decrypt(
TPMI_DH_OBJECT key_handle,
const std::string& key_handle_name,
TPM2B_PUBLIC_KEY_RSA cipher_text,
TPMT_RSA_DECRYPT in_scheme,
TPM2B_DATA label,
AuthorizationDelegate* authorization_delegate,
const RSA_DecryptResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_ECC_POINT z_point,
TPM2B_ECC_POINT pub_point)> ECDH_KeyGenResponse;
virtual void ECDH_KeyGen(
TPMI_DH_OBJECT key_handle,
const std::string& key_handle_name,
AuthorizationDelegate* authorization_delegate,
const ECDH_KeyGenResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_ECC_POINT out_point)> ECDH_ZGenResponse;
virtual void ECDH_ZGen(
TPMI_DH_OBJECT key_handle,
const std::string& key_handle_name,
TPM2B_ECC_POINT in_point,
AuthorizationDelegate* authorization_delegate,
const ECDH_ZGenResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPMS_ALGORITHM_DETAIL_ECC parameters)> ECC_ParametersResponse;
virtual void ECC_Parameters(
TPMI_ECC_CURVE curve_id,
AuthorizationDelegate* authorization_delegate,
const ECC_ParametersResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_ECC_POINT out_z1,
TPM2B_ECC_POINT out_z2)> ZGen_2PhaseResponse;
virtual void ZGen_2Phase(
TPMI_DH_OBJECT key_a,
const std::string& key_a_name,
TPM2B_ECC_POINT in_qs_b,
TPM2B_ECC_POINT in_qe_b,
TPMI_ECC_KEY_EXCHANGE in_scheme,
UINT16 counter,
AuthorizationDelegate* authorization_delegate,
const ZGen_2PhaseResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_MAX_BUFFER out_data,
TPM2B_IV iv_out)> EncryptDecryptResponse;
virtual void EncryptDecrypt(
TPMI_DH_OBJECT key_handle,
const std::string& key_handle_name,
TPMI_YES_NO decrypt,
TPMI_ALG_SYM_MODE mode,
TPM2B_IV iv_in,
TPM2B_MAX_BUFFER in_data,
AuthorizationDelegate* authorization_delegate,
const EncryptDecryptResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_DIGEST out_hash,
TPMT_TK_HASHCHECK validation)> HashResponse;
virtual void Hash(
TPMI_RH_HIERARCHY hierarchy,
const std::string& hierarchy_name,
TPM2B_MAX_BUFFER data,
TPMI_ALG_HASH hash_alg,
AuthorizationDelegate* authorization_delegate,
const HashResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_DIGEST out_hmac)> HMACResponse;
virtual void HMAC(
TPMI_DH_OBJECT handle,
const std::string& handle_name,
TPM2B_MAX_BUFFER buffer,
TPMI_ALG_HASH hash_alg,
AuthorizationDelegate* authorization_delegate,
const HMACResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_DIGEST random_bytes)> GetRandomResponse;
virtual void GetRandom(
UINT16 bytes_requested,
AuthorizationDelegate* authorization_delegate,
const GetRandomResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> StirRandomResponse;
virtual void StirRandom(
TPM2B_SENSITIVE_DATA in_data,
AuthorizationDelegate* authorization_delegate,
const StirRandomResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPMI_DH_OBJECT sequence_handle)> HMAC_StartResponse;
virtual void HMAC_Start(
TPMI_DH_OBJECT handle,
const std::string& handle_name,
TPM2B_AUTH auth,
TPMI_ALG_HASH hash_alg,
AuthorizationDelegate* authorization_delegate,
const HMAC_StartResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPMI_DH_OBJECT sequence_handle)> HashSequenceStartResponse;
virtual void HashSequenceStart(
TPM2B_AUTH auth,
TPMI_ALG_HASH hash_alg,
AuthorizationDelegate* authorization_delegate,
const HashSequenceStartResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> SequenceUpdateResponse;
virtual void SequenceUpdate(
TPMI_DH_OBJECT sequence_handle,
const std::string& sequence_handle_name,
TPM2B_MAX_BUFFER buffer,
AuthorizationDelegate* authorization_delegate,
const SequenceUpdateResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_DIGEST result,
TPMT_TK_HASHCHECK validation)> SequenceCompleteResponse;
virtual void SequenceComplete(
TPMI_DH_OBJECT sequence_handle,
const std::string& sequence_handle_name,
TPMI_RH_HIERARCHY hierarchy,
const std::string& hierarchy_name,
TPM2B_MAX_BUFFER buffer,
AuthorizationDelegate* authorization_delegate,
const SequenceCompleteResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPML_DIGEST_VALUES results)> EventSequenceCompleteResponse;
virtual void EventSequenceComplete(
TPMI_DH_PCR pcr_handle,
const std::string& pcr_handle_name,
TPMI_DH_OBJECT sequence_handle,
const std::string& sequence_handle_name,
TPM2B_MAX_BUFFER buffer,
AuthorizationDelegate* authorization_delegate,
const EventSequenceCompleteResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_ATTEST certify_info,
TPMT_SIGNATURE signature)> CertifyResponse;
virtual void Certify(
TPMI_DH_OBJECT object_handle,
const std::string& object_handle_name,
TPMI_DH_OBJECT sign_handle,
const std::string& sign_handle_name,
TPM2B_DATA qualifying_data,
TPMT_SIG_SCHEME in_scheme,
AuthorizationDelegate* authorization_delegate,
const CertifyResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_ATTEST certify_info,
TPMT_SIGNATURE signature)> CertifyCreationResponse;
virtual void CertifyCreation(
TPMI_DH_OBJECT sign_handle,
const std::string& sign_handle_name,
TPMI_DH_OBJECT object_handle,
const std::string& object_handle_name,
TPM2B_DATA qualifying_data,
TPM2B_DIGEST creation_hash,
TPMT_SIG_SCHEME in_scheme,
TPMT_TK_CREATION creation_ticket,
AuthorizationDelegate* authorization_delegate,
const CertifyCreationResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_ATTEST quoted,
TPMT_SIGNATURE signature)> QuoteResponse;
virtual void Quote(
TPMI_DH_OBJECT sign_handle,
const std::string& sign_handle_name,
TPM2B_DATA qualifying_data,
TPMT_SIG_SCHEME in_scheme,
TPML_PCR_SELECTION pcrselect,
AuthorizationDelegate* authorization_delegate,
const QuoteResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_ATTEST audit_info,
TPMT_SIGNATURE signature)> GetSessionAuditDigestResponse;
virtual void GetSessionAuditDigest(
TPMI_RH_ENDORSEMENT privacy_admin_handle,
const std::string& privacy_admin_handle_name,
TPMI_DH_OBJECT sign_handle,
const std::string& sign_handle_name,
TPMI_SH_HMAC session_handle,
const std::string& session_handle_name,
TPM2B_DATA qualifying_data,
TPMT_SIG_SCHEME in_scheme,
AuthorizationDelegate* authorization_delegate,
const GetSessionAuditDigestResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_ATTEST audit_info,
TPMT_SIGNATURE signature)> GetCommandAuditDigestResponse;
virtual void GetCommandAuditDigest(
TPMI_RH_ENDORSEMENT privacy_handle,
const std::string& privacy_handle_name,
TPMI_DH_OBJECT sign_handle,
const std::string& sign_handle_name,
TPM2B_DATA qualifying_data,
TPMT_SIG_SCHEME in_scheme,
AuthorizationDelegate* authorization_delegate,
const GetCommandAuditDigestResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_ATTEST time_info,
TPMT_SIGNATURE signature)> GetTimeResponse;
virtual void GetTime(
TPMI_RH_ENDORSEMENT privacy_admin_handle,
const std::string& privacy_admin_handle_name,
TPMI_DH_OBJECT sign_handle,
const std::string& sign_handle_name,
TPM2B_DATA qualifying_data,
TPMT_SIG_SCHEME in_scheme,
AuthorizationDelegate* authorization_delegate,
const GetTimeResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
UINT32 param_size,
TPM2B_ECC_POINT k,
TPM2B_ECC_POINT l,
TPM2B_ECC_POINT e,
UINT16 counter)> CommitResponse;
virtual void Commit(
TPMI_DH_OBJECT sign_handle,
const std::string& sign_handle_name,
UINT32 param_size,
TPM2B_ECC_POINT p1,
TPM2B_SENSITIVE_DATA s2,
TPM2B_ECC_PARAMETER y2,
AuthorizationDelegate* authorization_delegate,
const CommitResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
UINT32 param_size,
TPM2B_ECC_POINT q,
UINT16 counter)> EC_EphemeralResponse;
virtual void EC_Ephemeral(
UINT32 param_size,
TPMI_ECC_CURVE curve_id,
AuthorizationDelegate* authorization_delegate,
const EC_EphemeralResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPMT_TK_VERIFIED validation)> VerifySignatureResponse;
virtual void VerifySignature(
TPMI_DH_OBJECT key_handle,
const std::string& key_handle_name,
TPM2B_DIGEST digest,
TPMT_SIGNATURE signature,
AuthorizationDelegate* authorization_delegate,
const VerifySignatureResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPMT_SIGNATURE signature)> SignResponse;
virtual void Sign(
TPMI_DH_OBJECT key_handle,
const std::string& key_handle_name,
TPM2B_DIGEST digest,
TPMT_SIG_SCHEME in_scheme,
TPMT_TK_HASHCHECK validation,
AuthorizationDelegate* authorization_delegate,
const SignResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> SetCommandCodeAuditStatusResponse;
virtual void SetCommandCodeAuditStatus(
TPMI_RH_PROVISION auth,
const std::string& auth_name,
TPMI_ALG_HASH audit_alg,
TPML_CC set_list,
TPML_CC clear_list,
AuthorizationDelegate* authorization_delegate,
const SetCommandCodeAuditStatusResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PCR_ExtendResponse;
virtual void PCR_Extend(
TPMI_DH_PCR pcr_handle,
const std::string& pcr_handle_name,
TPML_DIGEST_VALUES digests,
AuthorizationDelegate* authorization_delegate,
const PCR_ExtendResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPML_DIGEST_VALUES digests)> PCR_EventResponse;
virtual void PCR_Event(
TPMI_DH_PCR pcr_handle,
const std::string& pcr_handle_name,
TPM2B_EVENT event_data,
AuthorizationDelegate* authorization_delegate,
const PCR_EventResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
UINT32 pcr_update_counter,
TPML_PCR_SELECTION pcr_selection_out,
TPML_DIGEST pcr_values)> PCR_ReadResponse;
virtual void PCR_Read(
TPML_PCR_SELECTION pcr_selection_in,
AuthorizationDelegate* authorization_delegate,
const PCR_ReadResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPMI_YES_NO allocation_success,
UINT32 max_pcr,
UINT32 size_needed,
UINT32 size_available)> PCR_AllocateResponse;
virtual void PCR_Allocate(
TPMI_RH_PLATFORM auth_handle,
const std::string& auth_handle_name,
TPML_PCR_SELECTION pcr_allocation,
AuthorizationDelegate* authorization_delegate,
const PCR_AllocateResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PCR_SetAuthPolicyResponse;
virtual void PCR_SetAuthPolicy(
TPMI_RH_PLATFORM auth_handle,
const std::string& auth_handle_name,
TPMI_DH_PCR pcr_num,
const std::string& pcr_num_name,
TPM2B_DIGEST auth_policy,
TPMI_ALG_HASH policy_digest,
AuthorizationDelegate* authorization_delegate,
const PCR_SetAuthPolicyResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PCR_SetAuthValueResponse;
virtual void PCR_SetAuthValue(
TPMI_DH_PCR pcr_handle,
const std::string& pcr_handle_name,
TPM2B_DIGEST auth,
AuthorizationDelegate* authorization_delegate,
const PCR_SetAuthValueResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PCR_ResetResponse;
virtual void PCR_Reset(
TPMI_DH_PCR pcr_handle,
const std::string& pcr_handle_name,
AuthorizationDelegate* authorization_delegate,
const PCR_ResetResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_TIMEOUT timeout,
TPMT_TK_AUTH policy_ticket)> PolicySignedResponse;
virtual void PolicySigned(
TPMI_DH_OBJECT auth_object,
const std::string& auth_object_name,
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPM2B_NONCE nonce_tpm,
TPM2B_DIGEST cp_hash_a,
TPM2B_NONCE policy_ref,
TPMT_SIGNATURE auth,
AuthorizationDelegate* authorization_delegate,
const PolicySignedResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_TIMEOUT timeout,
TPMT_TK_AUTH policy_ticket)> PolicySecretResponse;
virtual void PolicySecret(
TPMI_DH_ENTITY auth_handle,
const std::string& auth_handle_name,
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPM2B_NONCE nonce_tpm,
TPM2B_DIGEST cp_hash_a,
TPM2B_NONCE policy_ref,
AuthorizationDelegate* authorization_delegate,
const PolicySecretResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyTicketResponse;
virtual void PolicyTicket(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPM2B_TIMEOUT timeout,
TPM2B_DIGEST cp_hash_a,
TPM2B_NONCE policy_ref,
TPM2B_NAME auth_name,
TPMT_TK_AUTH ticket,
AuthorizationDelegate* authorization_delegate,
const PolicyTicketResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyORResponse;
virtual void PolicyOR(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPML_DIGEST p_hash_list,
AuthorizationDelegate* authorization_delegate,
const PolicyORResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyPCRResponse;
virtual void PolicyPCR(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPM2B_DIGEST pcr_digest,
TPML_PCR_SELECTION pcrs,
AuthorizationDelegate* authorization_delegate,
const PolicyPCRResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyLocalityResponse;
virtual void PolicyLocality(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPMA_LOCALITY locality,
AuthorizationDelegate* authorization_delegate,
const PolicyLocalityResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyNVResponse;
virtual void PolicyNV(
TPMI_RH_NV_AUTH auth_handle,
const std::string& auth_handle_name,
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPM2B_OPERAND operand_b,
UINT16 offset,
TPM_EO operation,
AuthorizationDelegate* authorization_delegate,
const PolicyNVResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyCounterTimerResponse;
virtual void PolicyCounterTimer(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPM2B_OPERAND operand_b,
UINT16 offset,
TPM_EO operation,
AuthorizationDelegate* authorization_delegate,
const PolicyCounterTimerResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyCommandCodeResponse;
virtual void PolicyCommandCode(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPM_CC code,
AuthorizationDelegate* authorization_delegate,
const PolicyCommandCodeResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyPhysicalPresenceResponse;
virtual void PolicyPhysicalPresence(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
AuthorizationDelegate* authorization_delegate,
const PolicyPhysicalPresenceResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyCpHashResponse;
virtual void PolicyCpHash(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPM2B_DIGEST cp_hash_a,
AuthorizationDelegate* authorization_delegate,
const PolicyCpHashResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyNameHashResponse;
virtual void PolicyNameHash(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPM2B_DIGEST name_hash,
AuthorizationDelegate* authorization_delegate,
const PolicyNameHashResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyDuplicationSelectResponse;
virtual void PolicyDuplicationSelect(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPM2B_NAME object_name,
TPM2B_NAME new_parent_name,
TPMI_YES_NO include_object,
AuthorizationDelegate* authorization_delegate,
const PolicyDuplicationSelectResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyAuthorizeResponse;
virtual void PolicyAuthorize(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPM2B_DIGEST approved_policy,
TPM2B_NONCE policy_ref,
TPM2B_NAME key_sign,
TPMT_TK_VERIFIED check_ticket,
AuthorizationDelegate* authorization_delegate,
const PolicyAuthorizeResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyAuthValueResponse;
virtual void PolicyAuthValue(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
AuthorizationDelegate* authorization_delegate,
const PolicyAuthValueResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyPasswordResponse;
virtual void PolicyPassword(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
AuthorizationDelegate* authorization_delegate,
const PolicyPasswordResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_DIGEST policy_digest)> PolicyGetDigestResponse;
virtual void PolicyGetDigest(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
AuthorizationDelegate* authorization_delegate,
const PolicyGetDigestResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PolicyNvWrittenResponse;
virtual void PolicyNvWritten(
TPMI_SH_POLICY policy_session,
const std::string& policy_session_name,
TPMI_YES_NO written_set,
AuthorizationDelegate* authorization_delegate,
const PolicyNvWrittenResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM_HANDLE object_handle,
TPM2B_PUBLIC out_public,
TPM2B_CREATION_DATA creation_data,
TPM2B_DIGEST creation_hash,
TPMT_TK_CREATION creation_ticket,
TPM2B_NAME name)> CreatePrimaryResponse;
virtual void CreatePrimary(
TPMI_RH_HIERARCHY primary_handle,
const std::string& primary_handle_name,
TPM2B_SENSITIVE_CREATE in_sensitive,
TPM2B_PUBLIC in_public,
TPM2B_DATA outside_info,
TPML_PCR_SELECTION creation_pcr,
AuthorizationDelegate* authorization_delegate,
const CreatePrimaryResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> HierarchyControlResponse;
virtual void HierarchyControl(
TPMI_RH_HIERARCHY auth_handle,
const std::string& auth_handle_name,
TPMI_RH_ENABLES enable,
const std::string& enable_name,
TPMI_YES_NO state,
AuthorizationDelegate* authorization_delegate,
const HierarchyControlResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> SetPrimaryPolicyResponse;
virtual void SetPrimaryPolicy(
TPMI_RH_HIERARCHY auth_handle,
const std::string& auth_handle_name,
TPM2B_DIGEST auth_policy,
TPMI_ALG_HASH hash_alg,
AuthorizationDelegate* authorization_delegate,
const SetPrimaryPolicyResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> ChangePPSResponse;
virtual void ChangePPS(
TPMI_RH_PLATFORM auth_handle,
const std::string& auth_handle_name,
AuthorizationDelegate* authorization_delegate,
const ChangePPSResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> ChangeEPSResponse;
virtual void ChangeEPS(
TPMI_RH_PLATFORM auth_handle,
const std::string& auth_handle_name,
AuthorizationDelegate* authorization_delegate,
const ChangeEPSResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> ClearResponse;
virtual void Clear(
TPMI_RH_CLEAR auth_handle,
const std::string& auth_handle_name,
AuthorizationDelegate* authorization_delegate,
const ClearResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> ClearControlResponse;
virtual void ClearControl(
TPMI_RH_CLEAR auth,
const std::string& auth_name,
TPMI_YES_NO disable,
AuthorizationDelegate* authorization_delegate,
const ClearControlResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> HierarchyChangeAuthResponse;
virtual void HierarchyChangeAuth(
TPMI_RH_HIERARCHY_AUTH auth_handle,
const std::string& auth_handle_name,
TPM2B_AUTH new_auth,
AuthorizationDelegate* authorization_delegate,
const HierarchyChangeAuthResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> DictionaryAttackLockResetResponse;
virtual void DictionaryAttackLockReset(
TPMI_RH_LOCKOUT lock_handle,
const std::string& lock_handle_name,
AuthorizationDelegate* authorization_delegate,
const DictionaryAttackLockResetResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> DictionaryAttackParametersResponse;
virtual void DictionaryAttackParameters(
TPMI_RH_LOCKOUT lock_handle,
const std::string& lock_handle_name,
UINT32 new_max_tries,
UINT32 new_recovery_time,
UINT32 lockout_recovery,
AuthorizationDelegate* authorization_delegate,
const DictionaryAttackParametersResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> PP_CommandsResponse;
virtual void PP_Commands(
TPMI_RH_PLATFORM auth,
const std::string& auth_name,
TPML_CC set_list,
TPML_CC clear_list,
AuthorizationDelegate* authorization_delegate,
const PP_CommandsResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> SetAlgorithmSetResponse;
virtual void SetAlgorithmSet(
TPMI_RH_PLATFORM auth_handle,
const std::string& auth_handle_name,
UINT32 algorithm_set,
AuthorizationDelegate* authorization_delegate,
const SetAlgorithmSetResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> FieldUpgradeStartResponse;
virtual void FieldUpgradeStart(
TPMI_RH_PLATFORM authorization,
const std::string& authorization_name,
TPMI_DH_OBJECT key_handle,
const std::string& key_handle_name,
TPM2B_DIGEST fu_digest,
TPMT_SIGNATURE manifest_signature,
AuthorizationDelegate* authorization_delegate,
const FieldUpgradeStartResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPMT_HA next_digest,
TPMT_HA first_digest)> FieldUpgradeDataResponse;
virtual void FieldUpgradeData(
TPM2B_MAX_BUFFER fu_data,
AuthorizationDelegate* authorization_delegate,
const FieldUpgradeDataResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_MAX_BUFFER fu_data)> FirmwareReadResponse;
virtual void FirmwareRead(
UINT32 sequence_number,
AuthorizationDelegate* authorization_delegate,
const FirmwareReadResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPMS_CONTEXT context)> ContextSaveResponse;
virtual void ContextSave(
TPMI_DH_CONTEXT save_handle,
const std::string& save_handle_name,
AuthorizationDelegate* authorization_delegate,
const ContextSaveResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPMI_DH_CONTEXT loaded_handle)> ContextLoadResponse;
virtual void ContextLoad(
TPMS_CONTEXT context,
AuthorizationDelegate* authorization_delegate,
const ContextLoadResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> FlushContextResponse;
virtual void FlushContext(
TPMI_DH_CONTEXT flush_handle,
const std::string& flush_handle_name,
AuthorizationDelegate* authorization_delegate,
const FlushContextResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> EvictControlResponse;
virtual void EvictControl(
TPMI_RH_PROVISION auth,
const std::string& auth_name,
TPMI_DH_OBJECT object_handle,
const std::string& object_handle_name,
TPMI_DH_PERSISTENT persistent_handle,
const std::string& persistent_handle_name,
AuthorizationDelegate* authorization_delegate,
const EvictControlResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM_RC return_code,
TPMS_TIME_INFO current_time)> ReadClockResponse;
virtual void ReadClock(
AuthorizationDelegate* authorization_delegate,
const ReadClockResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM_RC return_code)> ClockSetResponse;
virtual void ClockSet(
TPMI_RH_PROVISION auth,
const std::string& auth_name,
UINT64 new_time,
AuthorizationDelegate* authorization_delegate,
const ClockSetResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM_RC return_code)> ClockRateAdjustResponse;
virtual void ClockRateAdjust(
TPMI_RH_PROVISION auth,
const std::string& auth_name,
TPM_CLOCK_ADJUST rate_adjust,
AuthorizationDelegate* authorization_delegate,
const ClockRateAdjustResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPMI_YES_NO more_data,
TPMS_CAPABILITY_DATA capability_data)> GetCapabilityResponse;
virtual void GetCapability(
TPM_CAP capability,
UINT32 property,
UINT32 property_count,
AuthorizationDelegate* authorization_delegate,
const GetCapabilityResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> TestParmsResponse;
virtual void TestParms(
TPMT_PUBLIC_PARMS parameters,
AuthorizationDelegate* authorization_delegate,
const TestParmsResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> NV_DefineSpaceResponse;
virtual void NV_DefineSpace(
TPMI_RH_PROVISION auth_handle,
const std::string& auth_handle_name,
TPM2B_AUTH auth,
TPM2B_NV_PUBLIC public_info,
AuthorizationDelegate* authorization_delegate,
const NV_DefineSpaceResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> NV_UndefineSpaceResponse;
virtual void NV_UndefineSpace(
TPMI_RH_PROVISION auth_handle,
const std::string& auth_handle_name,
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
AuthorizationDelegate* authorization_delegate,
const NV_UndefineSpaceResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> NV_UndefineSpaceSpecialResponse;
virtual void NV_UndefineSpaceSpecial(
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
TPMI_RH_PLATFORM platform,
const std::string& platform_name,
AuthorizationDelegate* authorization_delegate,
const NV_UndefineSpaceSpecialResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_NV_PUBLIC nv_public,
TPM2B_NAME nv_name)> NV_ReadPublicResponse;
virtual void NV_ReadPublic(
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
AuthorizationDelegate* authorization_delegate,
const NV_ReadPublicResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> NV_WriteResponse;
virtual void NV_Write(
TPMI_RH_NV_AUTH auth_handle,
const std::string& auth_handle_name,
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
TPM2B_MAX_NV_BUFFER data,
UINT16 offset,
AuthorizationDelegate* authorization_delegate,
const NV_WriteResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> NV_IncrementResponse;
virtual void NV_Increment(
TPMI_RH_NV_AUTH auth_handle,
const std::string& auth_handle_name,
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
AuthorizationDelegate* authorization_delegate,
const NV_IncrementResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> NV_ExtendResponse;
virtual void NV_Extend(
TPMI_RH_NV_AUTH auth_handle,
const std::string& auth_handle_name,
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
TPM2B_MAX_NV_BUFFER data,
AuthorizationDelegate* authorization_delegate,
const NV_ExtendResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> NV_SetBitsResponse;
virtual void NV_SetBits(
TPMI_RH_NV_AUTH auth_handle,
const std::string& auth_handle_name,
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
UINT64 bits,
AuthorizationDelegate* authorization_delegate,
const NV_SetBitsResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> NV_WriteLockResponse;
virtual void NV_WriteLock(
TPMI_RH_NV_AUTH auth_handle,
const std::string& auth_handle_name,
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
AuthorizationDelegate* authorization_delegate,
const NV_WriteLockResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> NV_GlobalWriteLockResponse;
virtual void NV_GlobalWriteLock(
TPMI_RH_PROVISION auth_handle,
const std::string& auth_handle_name,
AuthorizationDelegate* authorization_delegate,
const NV_GlobalWriteLockResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_MAX_NV_BUFFER data)> NV_ReadResponse;
virtual void NV_Read(
TPMI_RH_NV_AUTH auth_handle,
const std::string& auth_handle_name,
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
UINT16 size,
UINT16 offset,
AuthorizationDelegate* authorization_delegate,
const NV_ReadResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> NV_ReadLockResponse;
virtual void NV_ReadLock(
TPMI_RH_NV_AUTH auth_handle,
const std::string& auth_handle_name,
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
AuthorizationDelegate* authorization_delegate,
const NV_ReadLockResponse& callback);
typedef base::Callback<void(
TPM_RC response_code)> NV_ChangeAuthResponse;
virtual void NV_ChangeAuth(
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
TPM2B_AUTH new_auth,
AuthorizationDelegate* authorization_delegate,
const NV_ChangeAuthResponse& callback);
typedef base::Callback<void(
TPM_RC response_code,
TPM2B_ATTEST certify_info,
TPMT_SIGNATURE signature)> NV_CertifyResponse;
virtual void NV_Certify(
TPMI_DH_OBJECT sign_handle,
const std::string& sign_handle_name,
TPMI_RH_NV_AUTH auth_handle,
const std::string& auth_handle_name,
TPMI_RH_NV_INDEX nv_index,
const std::string& nv_index_name,
TPM2B_DATA qualifying_data,
TPMT_SIG_SCHEME in_scheme,
UINT16 size,
UINT16 offset,
AuthorizationDelegate* authorization_delegate,
const NV_CertifyResponse& callback);
private:
CommandTransceiver* transceiver_;
DISALLOW_COPY_AND_ASSIGN(Tpm);
};
} // namespace trunks
#endif // TRUNKS_TPM_GENERATED_H_