aboutsummaryrefslogtreecommitdiff
path: root/TPM_Types.h
blob: 4861827763519e844e850f7fad3cfdf8e0c10171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/*
 * Copyright 2015 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.
 *
 * The origin of this file is
 * https://github.com/tianocore/edk2.git:MdePkg/Include/IndustryStandard/Tpm20.h
 * published under BSD license. It can not be copied as is, as it collides
 * with some of the definitions of this package.
 */

#ifndef __TPM2_TPM_TYPES_H
#define __TPM2_TPM_TYPES_H

#include "Capabilities.h"
#include "Implementation.h"
typedef UINT32 TPM_SPEC;

#include "tpm_types.h"

/*
 * The below enum is just a pile of all return codes defined in functions in
 * part 4 of the spec.
 *
 * TODO: map these properly into Format-One error reporting.
 */
enum {
  RC_ActivateCredential_credentialBlob = 0,
  RC_ActivateCredential_keyHandle = 0,
  RC_ActivateCredential_secret = 0,
  RC_CertifyCreation_creationTicket = 0,
  RC_CertifyCreation_inScheme = 0,
  RC_CertifyCreation_signHandle = 0,
  RC_Certify_inScheme = 0,
  RC_Certify_signHandle = 0,
  RC_ClockSet_newTime = 0,
  RC_Commit_P1 = 0,
  RC_Commit_s2 = 0,
  RC_Commit_signHandle = 0,
  RC_Commit_y2 = 0,
  RC_ContextLoad_context = 0,
  RC_CreatePrimary_inPublic = 0,
  RC_CreatePrimary_inSensitive = 0,
  RC_Create_inPublic = 0,
  RC_Create_inSensitive = 0,
  RC_Create_parentHandle = 0,
  RC_Duplicate_encryptionKeyIn = 0,
  RC_Duplicate_newParentHandle = 0,
  RC_Duplicate_objectHandle = 0,
  RC_Duplicate_symmetricAlg = 0,
  RC_ECC_Parameters_curveID = 0,
  RC_ECDH_KeyGen_keyHandle = 0,
  RC_ECDH_ZGen_keyHandle = 0,
  RC_ECDH_ZGen_inPoint = 0,
  RC_EncryptDecrypt_inData = 0,
  RC_EncryptDecrypt_ivIn = 0,
  RC_EncryptDecrypt_keyHandle = 0,
  RC_EncryptDecrypt_mode = 0,
  RC_EventSequenceComplete_sequenceHandle = 0,
  RC_EvictControl_objectHandle = 0,
  RC_EvictControl_persistentHandle = 0,
  RC_GetCapability_property = 0,
  RC_GetCommandAuditDigest_signHandle = 0,
  RC_GetCommandAuditDigest_inScheme = 0,
  RC_GetSessionAuditDigest_inScheme = 0,
  RC_GetSessionAuditDigest_sessionHandle = 0,
  RC_GetSessionAuditDigest_signHandle = 0,
  RC_GetTime_inScheme = 0,
  RC_GetTime_signHandle = 0,
  RC_HMAC_handle = 0,
  RC_HMAC_hashAlg = 0,
  RC_HMAC_Start_handle = 0,
  RC_HMAC_Start_hashAlg = 0,
  RC_HierarchyChangeAuth_newAuth = 0,
  RC_Import_duplicate = 0,
  RC_Import_encryptionKey = 0,
  RC_Import_inSymSeed = 0,
  RC_Import_objectPublic = 0,
  RC_Import_parentHandle = 0,
  RC_IncrementalSelfTest_toTest = 0,
  RC_Load_inPrivate = 0,
  RC_Load_inPublic = 0,
  RC_Load_parentHandle = 0,
  RC_LoadExternal_hierarchy = 0,
  RC_LoadExternal_inPublic = 0,
  RC_MakeCredential_credential = 0,
  RC_MakeCredential_handle = 0,
  RC_NV_Certify_signHandle = 0,
  RC_NV_Certify_inScheme = 0,
  RC_NV_ChangeAuth_newAuth = 0,
  RC_NV_DefineSpace_auth = 0,
  RC_NV_DefineSpace_authHandle = 0,
  RC_NV_DefineSpace_publicInfo = 0,
  RC_NV_Extend_nvIndex = 0,
  RC_NV_Increment_nvIndex = 0,
  RC_NV_ReadLock_nvIndex = 0,
  RC_NV_SetBits_nvIndex = 0,
  RC_NV_UndefineSpace_nvIndex = 0,
  RC_NV_UndefineSpaceSpecial_nvIndex = 0,
  RC_NV_WriteLock_nvIndex = 0,
  RC_ObjectChangeAuth_newAuth = 0,
  RC_ObjectChangeAuth_objectHandle = 0,
  RC_ObjectChangeAuth_parentHandle = 0,
  RC_PCR_SetAuthPolicy_authPolicy = 0,
  RC_PCR_SetAuthPolicy_pcrNum = 0,
  RC_PolicyAuthorize_approvedPolicy = 0,
  RC_PolicyAuthorize_checkTicket = 0,
  RC_PolicyAuthorize_keySign = 0,
  RC_PolicyCommandCode_code = 0,
  RC_PolicyCpHash_cpHashA = 0,
  RC_PolicyLocality_locality = 0,
  RC_PolicyNV_operandB = 0,
  RC_PolicyNameHash_nameHash = 0,
  RC_PolicyNvWritten_writtenSet = 0,
  RC_PolicyOR_pHashList = 0,
  RC_PolicyPCR_pcrDigest = 0,
  RC_PolicySecret_cpHashA = 0,
  RC_PolicySecret_expiration = 0,
  RC_PolicySecret_nonceTPM = 0,
  RC_PolicySigned_auth = 0,
  RC_PolicySigned_cpHashA = 0,
  RC_PolicySigned_expiration = 0,
  RC_PolicySigned_nonceTPM = 0,
  RC_PolicyTicket_cpHashA = 0,
  RC_PolicyTicket_policySession = 0,
  RC_PolicyTicket_ticket = 0,
  RC_PolicyTicket_timeout = 0,
  RC_Quote_inScheme = 0,
  RC_Quote_signHandle = 0,
  RC_RSA_Decrypt_inScheme = 0,
  RC_RSA_Decrypt_keyHandle = 0,
  RC_RSA_Decrypt_label = 0,
  RC_RSA_Encrypt_inScheme = 0,
  RC_RSA_Encrypt_keyHandle = 0,
  RC_RSA_Encrypt_label = 0,
  RC_Rewrap_inDuplicate = 0,
  RC_Rewrap_inSymSeed = 0,
  RC_Rewrap_newParent = 0,
  RC_Rewrap_oldParent = 0,
  RC_SequenceComplete_sequenceHandle = 0,
  RC_SequenceUpdate_sequenceHandle = 0,
  RC_SetCommandCodeAuditStatus_auditAlg = 0,
  RC_SetPrimaryPolicy_authPolicy = 0,
  RC_Shutdown_shutdownType = 0,
  RC_Sign_digest = 0,
  RC_Sign_inScheme = 0,
  RC_Sign_keyHandle = 0,
  RC_Sign_validation = 0,
  RC_StartAuthSession_bind = 0,
  RC_StartAuthSession_encryptedSalt = 0,
  RC_StartAuthSession_nonceCaller = 0,
  RC_StartAuthSession_symmetric = 0,
  RC_StartAuthSession_tpmKey = 0,
  RC_Startup_startupType = 0,
  RC_Unseal_itemHandle = 0,
  RC_VerifySignature_keyHandle = 0,
  RC_VerifySignature_signature = 0,
  RC_ZGen_2Phase_counter = 0,
  RC_ZGen_2Phase_inQeB = 0,
  RC_ZGen_2Phase_inQsB = 0,
  RC_ZGen_2Phase_inScheme = 0,
  RC_ZGen_2Phase_keyA = 0,
};

#endif  // __TPM2_TPM_TYPES_H