aboutsummaryrefslogtreecommitdiff
path: root/GetCommandCodeString.c
blob: df3f58536ea6b0795beed91e96873c58974f9efc (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
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
// 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.

// THIS CODE IS GENERATED - DO NOT MODIFY!

#include "GetCommandCodeString_fp.h"

const char* GetCommandCodeString(TPM_CC command_code) {
  switch (command_code) {
#ifdef TPM_CC_ActivateCredential
    case TPM_CC_ActivateCredential:
      return "ActivateCredential";
#endif
#ifdef TPM_CC_Certify
    case TPM_CC_Certify:
      return "Certify";
#endif
#ifdef TPM_CC_CertifyCreation
    case TPM_CC_CertifyCreation:
      return "CertifyCreation";
#endif
#ifdef TPM_CC_ChangeEPS
    case TPM_CC_ChangeEPS:
      return "ChangeEPS";
#endif
#ifdef TPM_CC_ChangePPS
    case TPM_CC_ChangePPS:
      return "ChangePPS";
#endif
#ifdef TPM_CC_Clear
    case TPM_CC_Clear:
      return "Clear";
#endif
#ifdef TPM_CC_ClearControl
    case TPM_CC_ClearControl:
      return "ClearControl";
#endif
#ifdef TPM_CC_ClockRateAdjust
    case TPM_CC_ClockRateAdjust:
      return "ClockRateAdjust";
#endif
#ifdef TPM_CC_ClockSet
    case TPM_CC_ClockSet:
      return "ClockSet";
#endif
#ifdef TPM_CC_Commit
    case TPM_CC_Commit:
      return "Commit";
#endif
#ifdef TPM_CC_ContextLoad
    case TPM_CC_ContextLoad:
      return "ContextLoad";
#endif
#ifdef TPM_CC_ContextSave
    case TPM_CC_ContextSave:
      return "ContextSave";
#endif
#ifdef TPM_CC_Create
    case TPM_CC_Create:
      return "Create";
#endif
#ifdef TPM_CC_CreatePrimary
    case TPM_CC_CreatePrimary:
      return "CreatePrimary";
#endif
#ifdef TPM_CC_DictionaryAttackLockReset
    case TPM_CC_DictionaryAttackLockReset:
      return "DictionaryAttackLockReset";
#endif
#ifdef TPM_CC_DictionaryAttackParameters
    case TPM_CC_DictionaryAttackParameters:
      return "DictionaryAttackParameters";
#endif
#ifdef TPM_CC_Duplicate
    case TPM_CC_Duplicate:
      return "Duplicate";
#endif
#ifdef TPM_CC_ECC_Parameters
    case TPM_CC_ECC_Parameters:
      return "ECC_Parameters";
#endif
#ifdef TPM_CC_ECDH_KeyGen
    case TPM_CC_ECDH_KeyGen:
      return "ECDH_KeyGen";
#endif
#ifdef TPM_CC_ECDH_ZGen
    case TPM_CC_ECDH_ZGen:
      return "ECDH_ZGen";
#endif
#ifdef TPM_CC_EC_Ephemeral
    case TPM_CC_EC_Ephemeral:
      return "EC_Ephemeral";
#endif
#ifdef TPM_CC_EncryptDecrypt
    case TPM_CC_EncryptDecrypt:
      return "EncryptDecrypt";
#endif
#ifdef TPM_CC_EventSequenceComplete
    case TPM_CC_EventSequenceComplete:
      return "EventSequenceComplete";
#endif
#ifdef TPM_CC_EvictControl
    case TPM_CC_EvictControl:
      return "EvictControl";
#endif
#ifdef TPM_CC_FieldUpgradeData
    case TPM_CC_FieldUpgradeData:
      return "FieldUpgradeData";
#endif
#ifdef TPM_CC_FieldUpgradeStart
    case TPM_CC_FieldUpgradeStart:
      return "FieldUpgradeStart";
#endif
#ifdef TPM_CC_FirmwareRead
    case TPM_CC_FirmwareRead:
      return "FirmwareRead";
#endif
#ifdef TPM_CC_FlushContext
    case TPM_CC_FlushContext:
      return "FlushContext";
#endif
#ifdef TPM_CC_GetCapability
    case TPM_CC_GetCapability:
      return "GetCapability";
#endif
#ifdef TPM_CC_GetCommandAuditDigest
    case TPM_CC_GetCommandAuditDigest:
      return "GetCommandAuditDigest";
#endif
#ifdef TPM_CC_GetRandom
    case TPM_CC_GetRandom:
      return "GetRandom";
#endif
#ifdef TPM_CC_GetSessionAuditDigest
    case TPM_CC_GetSessionAuditDigest:
      return "GetSessionAuditDigest";
#endif
#ifdef TPM_CC_GetTestResult
    case TPM_CC_GetTestResult:
      return "GetTestResult";
#endif
#ifdef TPM_CC_GetTime
    case TPM_CC_GetTime:
      return "GetTime";
#endif
#ifdef TPM_CC_HMAC
    case TPM_CC_HMAC:
      return "HMAC";
#endif
#ifdef TPM_CC_HMAC_Start
    case TPM_CC_HMAC_Start:
      return "HMAC_Start";
#endif
#ifdef TPM_CC_Hash
    case TPM_CC_Hash:
      return "Hash";
#endif
#ifdef TPM_CC_HashSequenceStart
    case TPM_CC_HashSequenceStart:
      return "HashSequenceStart";
#endif
#ifdef TPM_CC_HierarchyChangeAuth
    case TPM_CC_HierarchyChangeAuth:
      return "HierarchyChangeAuth";
#endif
#ifdef TPM_CC_HierarchyControl
    case TPM_CC_HierarchyControl:
      return "HierarchyControl";
#endif
#ifdef TPM_CC_Import
    case TPM_CC_Import:
      return "Import";
#endif
#ifdef TPM_CC_IncrementalSelfTest
    case TPM_CC_IncrementalSelfTest:
      return "IncrementalSelfTest";
#endif
#ifdef TPM_CC_Load
    case TPM_CC_Load:
      return "Load";
#endif
#ifdef TPM_CC_LoadExternal
    case TPM_CC_LoadExternal:
      return "LoadExternal";
#endif
#ifdef TPM_CC_MakeCredential
    case TPM_CC_MakeCredential:
      return "MakeCredential";
#endif
#ifdef TPM_CC_NV_Certify
    case TPM_CC_NV_Certify:
      return "NV_Certify";
#endif
#ifdef TPM_CC_NV_ChangeAuth
    case TPM_CC_NV_ChangeAuth:
      return "NV_ChangeAuth";
#endif
#ifdef TPM_CC_NV_DefineSpace
    case TPM_CC_NV_DefineSpace:
      return "NV_DefineSpace";
#endif
#ifdef TPM_CC_NV_Extend
    case TPM_CC_NV_Extend:
      return "NV_Extend";
#endif
#ifdef TPM_CC_NV_GlobalWriteLock
    case TPM_CC_NV_GlobalWriteLock:
      return "NV_GlobalWriteLock";
#endif
#ifdef TPM_CC_NV_Increment
    case TPM_CC_NV_Increment:
      return "NV_Increment";
#endif
#ifdef TPM_CC_NV_Read
    case TPM_CC_NV_Read:
      return "NV_Read";
#endif
#ifdef TPM_CC_NV_ReadLock
    case TPM_CC_NV_ReadLock:
      return "NV_ReadLock";
#endif
#ifdef TPM_CC_NV_ReadPublic
    case TPM_CC_NV_ReadPublic:
      return "NV_ReadPublic";
#endif
#ifdef TPM_CC_NV_SetBits
    case TPM_CC_NV_SetBits:
      return "NV_SetBits";
#endif
#ifdef TPM_CC_NV_UndefineSpace
    case TPM_CC_NV_UndefineSpace:
      return "NV_UndefineSpace";
#endif
#ifdef TPM_CC_NV_UndefineSpaceSpecial
    case TPM_CC_NV_UndefineSpaceSpecial:
      return "NV_UndefineSpaceSpecial";
#endif
#ifdef TPM_CC_NV_Write
    case TPM_CC_NV_Write:
      return "NV_Write";
#endif
#ifdef TPM_CC_NV_WriteLock
    case TPM_CC_NV_WriteLock:
      return "NV_WriteLock";
#endif
#ifdef TPM_CC_ObjectChangeAuth
    case TPM_CC_ObjectChangeAuth:
      return "ObjectChangeAuth";
#endif
#ifdef TPM_CC_PCR_Allocate
    case TPM_CC_PCR_Allocate:
      return "PCR_Allocate";
#endif
#ifdef TPM_CC_PCR_Event
    case TPM_CC_PCR_Event:
      return "PCR_Event";
#endif
#ifdef TPM_CC_PCR_Extend
    case TPM_CC_PCR_Extend:
      return "PCR_Extend";
#endif
#ifdef TPM_CC_PCR_Read
    case TPM_CC_PCR_Read:
      return "PCR_Read";
#endif
#ifdef TPM_CC_PCR_Reset
    case TPM_CC_PCR_Reset:
      return "PCR_Reset";
#endif
#ifdef TPM_CC_PCR_SetAuthPolicy
    case TPM_CC_PCR_SetAuthPolicy:
      return "PCR_SetAuthPolicy";
#endif
#ifdef TPM_CC_PCR_SetAuthValue
    case TPM_CC_PCR_SetAuthValue:
      return "PCR_SetAuthValue";
#endif
#ifdef TPM_CC_PP_Commands
    case TPM_CC_PP_Commands:
      return "PP_Commands";
#endif
#ifdef TPM_CC_PolicyAuthValue
    case TPM_CC_PolicyAuthValue:
      return "PolicyAuthValue";
#endif
#ifdef TPM_CC_PolicyAuthorize
    case TPM_CC_PolicyAuthorize:
      return "PolicyAuthorize";
#endif
#ifdef TPM_CC_PolicyCommandCode
    case TPM_CC_PolicyCommandCode:
      return "PolicyCommandCode";
#endif
#ifdef TPM_CC_PolicyCounterTimer
    case TPM_CC_PolicyCounterTimer:
      return "PolicyCounterTimer";
#endif
#ifdef TPM_CC_PolicyCpHash
    case TPM_CC_PolicyCpHash:
      return "PolicyCpHash";
#endif
#ifdef TPM_CC_PolicyDuplicationSelect
    case TPM_CC_PolicyDuplicationSelect:
      return "PolicyDuplicationSelect";
#endif
#ifdef TPM_CC_PolicyGetDigest
    case TPM_CC_PolicyGetDigest:
      return "PolicyGetDigest";
#endif
#ifdef TPM_CC_PolicyLocality
    case TPM_CC_PolicyLocality:
      return "PolicyLocality";
#endif
#ifdef TPM_CC_PolicyNV
    case TPM_CC_PolicyNV:
      return "PolicyNV";
#endif
#ifdef TPM_CC_PolicyNameHash
    case TPM_CC_PolicyNameHash:
      return "PolicyNameHash";
#endif
#ifdef TPM_CC_PolicyNvWritten
    case TPM_CC_PolicyNvWritten:
      return "PolicyNvWritten";
#endif
#ifdef TPM_CC_PolicyOR
    case TPM_CC_PolicyOR:
      return "PolicyOR";
#endif
#ifdef TPM_CC_PolicyPCR
    case TPM_CC_PolicyPCR:
      return "PolicyPCR";
#endif
#ifdef TPM_CC_PolicyPassword
    case TPM_CC_PolicyPassword:
      return "PolicyPassword";
#endif
#ifdef TPM_CC_PolicyPhysicalPresence
    case TPM_CC_PolicyPhysicalPresence:
      return "PolicyPhysicalPresence";
#endif
#ifdef TPM_CC_PolicyRestart
    case TPM_CC_PolicyRestart:
      return "PolicyRestart";
#endif
#ifdef TPM_CC_PolicySecret
    case TPM_CC_PolicySecret:
      return "PolicySecret";
#endif
#ifdef TPM_CC_PolicySigned
    case TPM_CC_PolicySigned:
      return "PolicySigned";
#endif
#ifdef TPM_CC_PolicyTicket
    case TPM_CC_PolicyTicket:
      return "PolicyTicket";
#endif
#ifdef TPM_CC_Quote
    case TPM_CC_Quote:
      return "Quote";
#endif
#ifdef TPM_CC_RSA_Decrypt
    case TPM_CC_RSA_Decrypt:
      return "RSA_Decrypt";
#endif
#ifdef TPM_CC_RSA_Encrypt
    case TPM_CC_RSA_Encrypt:
      return "RSA_Encrypt";
#endif
#ifdef TPM_CC_ReadClock
    case TPM_CC_ReadClock:
      return "ReadClock";
#endif
#ifdef TPM_CC_ReadPublic
    case TPM_CC_ReadPublic:
      return "ReadPublic";
#endif
#ifdef TPM_CC_Rewrap
    case TPM_CC_Rewrap:
      return "Rewrap";
#endif
#ifdef TPM_CC_SelfTest
    case TPM_CC_SelfTest:
      return "SelfTest";
#endif
#ifdef TPM_CC_SequenceComplete
    case TPM_CC_SequenceComplete:
      return "SequenceComplete";
#endif
#ifdef TPM_CC_SequenceUpdate
    case TPM_CC_SequenceUpdate:
      return "SequenceUpdate";
#endif
#ifdef TPM_CC_SetAlgorithmSet
    case TPM_CC_SetAlgorithmSet:
      return "SetAlgorithmSet";
#endif
#ifdef TPM_CC_SetCommandCodeAuditStatus
    case TPM_CC_SetCommandCodeAuditStatus:
      return "SetCommandCodeAuditStatus";
#endif
#ifdef TPM_CC_SetPrimaryPolicy
    case TPM_CC_SetPrimaryPolicy:
      return "SetPrimaryPolicy";
#endif
#ifdef TPM_CC_Shutdown
    case TPM_CC_Shutdown:
      return "Shutdown";
#endif
#ifdef TPM_CC_Sign
    case TPM_CC_Sign:
      return "Sign";
#endif
#ifdef TPM_CC_StartAuthSession
    case TPM_CC_StartAuthSession:
      return "StartAuthSession";
#endif
#ifdef TPM_CC_Startup
    case TPM_CC_Startup:
      return "Startup";
#endif
#ifdef TPM_CC_StirRandom
    case TPM_CC_StirRandom:
      return "StirRandom";
#endif
#ifdef TPM_CC_TestParms
    case TPM_CC_TestParms:
      return "TestParms";
#endif
#ifdef TPM_CC_Unseal
    case TPM_CC_Unseal:
      return "Unseal";
#endif
#ifdef TPM_CC_VerifySignature
    case TPM_CC_VerifySignature:
      return "VerifySignature";
#endif
#ifdef TPM_CC_ZGen_2Phase
    case TPM_CC_ZGen_2Phase:
      return "ZGen_2Phase";
#endif
    default:
      return "Unknown command";
  }
}