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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
// WARNING: this file is auto-generated by xtask gen and may be overwritten
use *;
/// TPM 2.0: Asymmetric algorithm not supported or not correct.
pub const E_ASYMMETRIC : HResultError = from_constant; // TPM_20_E_ASYMMETRIC
/// TPM 2.0: Inconsistent attributes.
pub const E_ATTRIBUTES : HResultError = from_constant; // TPM_20_E_ATTRIBUTES
/// TPM 2.0: Hash algorithm not supported or not appropriate.
pub const E_HASH : HResultError = from_constant; // TPM_20_E_HASH
/// TPM 2.0: Value is out of range or is not correct for the context.
pub const E_VALUE : HResultError = from_constant; // TPM_20_E_VALUE
/// TPM 2.0: Hierarchy is not enabled or is not correct for the use.
pub const E_HIERARCHY : HResultError = from_constant; // TPM_20_E_HIERARCHY
/// TPM 2.0: Key size is not supported.
pub const E_KEY_SIZE : HResultError = from_constant; // TPM_20_E_KEY_SIZE
/// TPM 2.0: Mask generation function not supported.
pub const E_MGF : HResultError = from_constant; // TPM_20_E_MGF
/// TPM 2.0: Mode of operation not supported.
pub const E_MODE : HResultError = from_constant; // TPM_20_E_MODE
/// TPM 2.0: The type of the value is not appropriate for the use.
pub const E_TYPE : HResultError = from_constant; // TPM_20_E_TYPE
/// TPM 2.0: The Handle is not correct for the use.
pub const E_HANDLE : HResultError = from_constant; // TPM_20_E_HANDLE
/// TPM 2.0: Unsupported key derivation function or function not appropriate for use.
pub const E_KDF : HResultError = from_constant; // TPM_20_E_KDF
/// TPM 2.0: Value was out of allowed range.
pub const E_RANGE : HResultError = from_constant; // TPM_20_E_RANGE
/// TPM 2.0: The authorization HMAC check failed and DA counter incremented.
pub const E_AUTH_FAIL : HResultError = from_constant; // TPM_20_E_AUTH_FAIL
/// TPM 2.0: Invalid nonce size.
pub const E_NONCE : HResultError = from_constant; // TPM_20_E_NONCE
/// TPM 2.0: Authorization requires assertion of PP.
pub const E_PP : HResultError = from_constant; // TPM_20_E_PP
/// TPM 2.0: Unsupported or incompatible scheme.
pub const E_SCHEME : HResultError = from_constant; // TPM_20_E_SCHEME
/// TPM 2.0: Structure is wrong size.
pub const E_SIZE : HResultError = from_constant; // TPM_20_E_SIZE
/// TPM 2.0: Unsupported symmetric algorithm or key size, or not appropriate for instance.
pub const E_SYMMETRIC : HResultError = from_constant; // TPM_20_E_SYMMETRIC
/// TPM 2.0: Incorrect structure tag.
pub const E_TAG : HResultError = from_constant; // TPM_20_E_TAG
/// TPM 2.0: Union selector is incorrect.
pub const E_SELECTOR : HResultError = from_constant; // TPM_20_E_SELECTOR
/// TPM 2.0: The TPM was unable to unmarshal a value because there were not enough octets in the input buffer.
pub const E_INSUFFICIENT : HResultError = from_constant; // TPM_20_E_INSUFFICIENT
/// TPM 2.0: The signature is not valid.
pub const E_SIGNATURE : HResultError = from_constant; // TPM_20_E_SIGNATURE
/// TPM 2.0: Key fields are not compatible with the selected use.
pub const E_KEY : HResultError = from_constant; // TPM_20_E_KEY
/// TPM 2.0: A policy check failed.
pub const E_POLICY_FAIL : HResultError = from_constant; // TPM_20_E_POLICY_FAIL
/// TPM 2.0: Integrity check failed.
pub const E_INTEGRITY : HResultError = from_constant; // TPM_20_E_INTEGRITY
/// TPM 2.0: Invalid ticket.
pub const E_TICKET : HResultError = from_constant; // TPM_20_E_TICKET
/// TPM 2.0: Reserved bits not set to zero as required.
pub const E_RESERVED_BITS : HResultError = from_constant; // TPM_20_E_RESERVED_BITS
/// TPM 2.0: Authorization failure without DA implications.
pub const E_BAD_AUTH : HResultError = from_constant; // TPM_20_E_BAD_AUTH
/// TPM 2.0: The policy has expired.
pub const E_EXPIRED : HResultError = from_constant; // TPM_20_E_EXPIRED
/// TPM 2.0: The command code in the policy is not the command code of the command or the command code in a policy command references a command that is not implemented.
pub const E_POLICY_CC : HResultError = from_constant; // TPM_20_E_POLICY_CC
/// TPM 2.0: Public and sensitive portions of an object are not cryptographically bound.
pub const E_BINDING : HResultError = from_constant; // TPM_20_E_BINDING
/// TPM 2.0: Curve not supported.
pub const E_CURVE : HResultError = from_constant; // TPM_20_E_CURVE
/// TPM 2.0: Point is not on the required curve.
pub const E_ECC_POINT : HResultError = from_constant; // TPM_20_E_ECC_POINT
/// TPM 2.0: TPM not initialized.
pub const E_INITIALIZE : HResultError = from_constant; // TPM_20_E_INITIALIZE
/// TPM 2.0: Commands not being accepted because of a TPM failure.
pub const E_FAILURE : HResultError = from_constant; // TPM_20_E_FAILURE
/// TPM 2.0: Improper use of a sequence handle.
pub const E_SEQUENCE : HResultError = from_constant; // TPM_20_E_SEQUENCE
/// TPM 2.0: TPM_RC_PRIVATE error.
pub const E_PRIVATE : HResultError = from_constant; // TPM_20_E_PRIVATE
/// TPM 2.0: TPM_RC_HMAC.
pub const E_HMAC : HResultError = from_constant; // TPM_20_E_HMAC
/// TPM 2.0: TPM_RC_DISABLED.
pub const E_DISABLED : HResultError = from_constant; // TPM_20_E_DISABLED
/// TPM 2.0: Command failed because audit sequence required exclusivity.
pub const E_EXCLUSIVE : HResultError = from_constant; // TPM_20_E_EXCLUSIVE
/// TPM 2.0: Unsupported ECC curve.
pub const E_ECC_CURVE : HResultError = from_constant; // TPM_20_E_ECC_CURVE
/// TPM 2.0: Authorization handle is not correct for command.
pub const E_AUTH_TYPE : HResultError = from_constant; // TPM_20_E_AUTH_TYPE
/// TPM 2.0: Command requires an authorization session for handle and is not present.
pub const E_AUTH_MISSING : HResultError = from_constant; // TPM_20_E_AUTH_MISSING
/// TPM 2.0: Policy failure in Math Operation or an invalid authPolicy value.
pub const E_POLICY : HResultError = from_constant; // TPM_20_E_POLICY
/// TPM 2.0: PCR check fail.
pub const E_PCR : HResultError = from_constant; // TPM_20_E_PCR
/// TPM 2.0: PCR have changed since checked.
pub const E_PCR_CHANGED : HResultError = from_constant; // TPM_20_E_PCR_CHANGED
/// TPM 2.0: The TPM is not in the right mode for upgrade.
pub const E_UPGRADE : HResultError = from_constant; // TPM_20_E_UPGRADE
/// TPM 2.0: Context ID counter is at maximum.
pub const E_TOO_MANY_CONTEXTS : HResultError = from_constant; // TPM_20_E_TOO_MANY_CONTEXTS
/// TPM 2.0: authValue or authPolicy is not available for selected entity.
pub const E_AUTH_UNAVAILABLE : HResultError = from_constant; // TPM_20_E_AUTH_UNAVAILABLE
/// TPM 2.0: A _TPM_Init and Startup(CLEAR) is required before the TPM can resume operation.
pub const E_REBOOT : HResultError = from_constant; // TPM_20_E_REBOOT
/// TPM 2.0: The protection algorithms (hash and symmetric) are not reasonably balanced. The digest size of the hash must be larger than the key size of the symmetric algorithm.
pub const E_UNBALANCED : HResultError = from_constant; // TPM_20_E_UNBALANCED
/// TPM 2.0: The TPM command's commandSize value is inconsistent with contents of the command buffer; either the size is not the same as the bytes loaded by the hardware interface layer or the value is not large enough to hold a command header.
pub const E_COMMAND_SIZE : HResultError = from_constant; // TPM_20_E_COMMAND_SIZE
/// TPM 2.0: Command code not supported.
pub const E_COMMAND_CODE : HResultError = from_constant; // TPM_20_E_COMMAND_CODE
/// TPM 2.0: The value of authorizationSize is out of range or the number of octets in the authorization Area is greater than required.
pub const E_AUTHSIZE : HResultError = from_constant; // TPM_20_E_AUTHSIZE
/// TPM 2.0: Use of an authorization session with a context command or another command that cannot have an authorization session.
pub const E_AUTH_CONTEXT : HResultError = from_constant; // TPM_20_E_AUTH_CONTEXT
/// TPM 2.0: NV offset+size is out of range.
pub const E_NV_RANGE : HResultError = from_constant; // TPM_20_E_NV_RANGE
/// TPM 2.0: Requested allocation size is larger than allowed.
pub const E_NV_SIZE : HResultError = from_constant; // TPM_20_E_NV_SIZE
/// TPM 2.0: NV access locked.
pub const E_NV_LOCKED : HResultError = from_constant; // TPM_20_E_NV_LOCKED
/// TPM 2.0: NV access authorization fails in command actions
pub const E_NV_AUTHORIZATION : HResultError = from_constant; // TPM_20_E_NV_AUTHORIZATION
/// TPM 2.0: An NV index is used before being initialized or the state saved by TPM2_Shutdown(STATE) could not be restored.
pub const E_NV_UNINITIALIZED : HResultError = from_constant; // TPM_20_E_NV_UNINITIALIZED
/// TPM 2.0: Insufficient space for NV allocation.
pub const E_NV_SPACE : HResultError = from_constant; // TPM_20_E_NV_SPACE
/// TPM 2.0: NV index or persistent object already defined.
pub const E_NV_DEFINED : HResultError = from_constant; // TPM_20_E_NV_DEFINED
/// TPM 2.0: Context in TPM2_ContextLoad() is not valid.
pub const E_BAD_CONTEXT : HResultError = from_constant; // TPM_20_E_BAD_CONTEXT
/// TPM 2.0: chHash value already set or not correct for use.
pub const E_CPHASH : HResultError = from_constant; // TPM_20_E_CPHASH
/// TPM 2.0: Handle for parent is not a valid parent.
pub const E_PARENT : HResultError = from_constant; // TPM_20_E_PARENT
/// TPM 2.0: Some function needs testing.
pub const E_NEEDS_TEST : HResultError = from_constant; // TPM_20_E_NEEDS_TEST
/// TPM 2.0: returned when an internal function cannot process a request due to an unspecified problem. This code is usually related to invalid parameters that are not properly filtered by the input unmarshaling code.
pub const E_NO_RESULT : HResultError = from_constant; // TPM_20_E_NO_RESULT
/// TPM 2.0: The sensitive area did not unmarshal correctly after decryption - this code is used in lieu of the other unmarshaling errors so that an attacker cannot determine where the unmarshaling error occurred.
pub const E_SENSITIVE : HResultError = from_constant; // TPM_20_E_SENSITIVE
/// TPM 2.0: Gap for context ID is too large.
pub const E_CONTEXT_GAP : HResultError = from_constant; // TPM_20_E_CONTEXT_GAP
/// TPM 2.0: Out of memory for object contexts.
pub const E_OBJECT_MEMORY : HResultError = from_constant; // TPM_20_E_OBJECT_MEMORY
/// TPM 2.0: Out of memory for session contexts.
pub const E_SESSION_MEMORY : HResultError = from_constant; // TPM_20_E_SESSION_MEMORY
/// TPM 2.0: Out of shared object/session memory or need space for internal operations.
pub const E_MEMORY : HResultError = from_constant; // TPM_20_E_MEMORY
/// TPM 2.0: Out of session handles - a session must be flushed before a nes session may be created.
pub const E_SESSION_HANDLES : HResultError = from_constant; // TPM_20_E_SESSION_HANDLES
/// TPM 2.0: Out of object handles - the handle space for objects is depleted and a reboot is required.
pub const E_OBJECT_HANDLES : HResultError = from_constant; // TPM_20_E_OBJECT_HANDLES
/// TPM 2.0: Bad locality.
pub const E_LOCALITY : HResultError = from_constant; // TPM_20_E_LOCALITY
/// TPM 2.0: The TPM has suspended operation on the command; forward progress was made and the command may be retried.
pub const E_YIELDED : HResultError = from_constant; // TPM_20_E_YIELDED
/// TPM 2.0: The command was canceled.
pub const E_CANCELED : HResultError = from_constant; // TPM_20_E_CANCELED
/// TPM 2.0: TPM is performing self-tests.
pub const E_TESTING : HResultError = from_constant; // TPM_20_E_TESTING
/// TPM 2.0: The TPM is rate-limiting accesses to prevent wearout of NV
pub const E_NV_RATE : HResultError = from_constant; // TPM_20_E_NV_RATE
/// TPM 2.0: Authorization for objects subject to DA protection are not allowed at this time because the TPM is in DA lockout mode.
pub const E_LOCKOUT : HResultError = from_constant; // TPM_20_E_LOCKOUT
/// TPM 2.0: The TPM was not able to start the command.
pub const E_RETRY : HResultError = from_constant; // TPM_20_E_RETRY
/// TPM 2.0: the command may require writing of NV and NV is not current accessible.
pub const E_NV_UNAVAILABLE : HResultError = from_constant; // TPM_20_E_NV_UNAVAILABLE