blob: ec52d2ad8077e50c8ac44b0fa387cbd58cb18fa1 [file] [log] [blame]
Jocelyn Bohr3863cc02015-08-13 13:20:05 -07001// Copyright 2015 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// THIS CODE IS GENERATED - DO NOT MODIFY!
6
7#include "GetCommandCodeString_fp.h"
8
9const char* GetCommandCodeString(TPM_CC command_code) {
10 switch (command_code) {
11#ifdef TPM_CC_Startup
12 case TPM_CC_Startup:
13 return "Startup";
14#endif
15#ifdef TPM_CC_Shutdown
16 case TPM_CC_Shutdown:
17 return "Shutdown";
18#endif
19#ifdef TPM_CC_SelfTest
20 case TPM_CC_SelfTest:
21 return "SelfTest";
22#endif
23#ifdef TPM_CC_IncrementalSelfTest
24 case TPM_CC_IncrementalSelfTest:
25 return "IncrementalSelfTest";
26#endif
27#ifdef TPM_CC_GetTestResult
28 case TPM_CC_GetTestResult:
29 return "GetTestResult";
30#endif
31#ifdef TPM_CC_StartAuthSession
32 case TPM_CC_StartAuthSession:
33 return "StartAuthSession";
34#endif
35#ifdef TPM_CC_PolicyRestart
36 case TPM_CC_PolicyRestart:
37 return "PolicyRestart";
38#endif
39#ifdef TPM_CC_Create
40 case TPM_CC_Create:
41 return "Create";
42#endif
43#ifdef TPM_CC_Load
44 case TPM_CC_Load:
45 return "Load";
46#endif
47#ifdef TPM_CC_LoadExternal
48 case TPM_CC_LoadExternal:
49 return "LoadExternal";
50#endif
51#ifdef TPM_CC_ReadPublic
52 case TPM_CC_ReadPublic:
53 return "ReadPublic";
54#endif
55#ifdef TPM_CC_ActivateCredential
56 case TPM_CC_ActivateCredential:
57 return "ActivateCredential";
58#endif
59#ifdef TPM_CC_MakeCredential
60 case TPM_CC_MakeCredential:
61 return "MakeCredential";
62#endif
63#ifdef TPM_CC_Unseal
64 case TPM_CC_Unseal:
65 return "Unseal";
66#endif
67#ifdef TPM_CC_ObjectChangeAuth
68 case TPM_CC_ObjectChangeAuth:
69 return "ObjectChangeAuth";
70#endif
71#ifdef TPM_CC_Duplicate
72 case TPM_CC_Duplicate:
73 return "Duplicate";
74#endif
75#ifdef TPM_CC_Rewrap
76 case TPM_CC_Rewrap:
77 return "Rewrap";
78#endif
79#ifdef TPM_CC_Import
80 case TPM_CC_Import:
81 return "Import";
82#endif
83#ifdef TPM_CC_RSA_Encrypt
84 case TPM_CC_RSA_Encrypt:
85 return "RSA_Encrypt";
86#endif
87#ifdef TPM_CC_RSA_Decrypt
88 case TPM_CC_RSA_Decrypt:
89 return "RSA_Decrypt";
90#endif
91#ifdef TPM_CC_ECDH_KeyGen
92 case TPM_CC_ECDH_KeyGen:
93 return "ECDH_KeyGen";
94#endif
95#ifdef TPM_CC_ECDH_ZGen
96 case TPM_CC_ECDH_ZGen:
97 return "ECDH_ZGen";
98#endif
99#ifdef TPM_CC_ECC_Parameters
100 case TPM_CC_ECC_Parameters:
101 return "ECC_Parameters";
102#endif
103#ifdef TPM_CC_ZGen_2Phase
104 case TPM_CC_ZGen_2Phase:
105 return "ZGen_2Phase";
106#endif
107#ifdef TPM_CC_EncryptDecrypt
108 case TPM_CC_EncryptDecrypt:
109 return "EncryptDecrypt";
110#endif
111#ifdef TPM_CC_Hash
112 case TPM_CC_Hash:
113 return "Hash";
114#endif
115#ifdef TPM_CC_HMAC
116 case TPM_CC_HMAC:
117 return "HMAC";
118#endif
119#ifdef TPM_CC_GetRandom
120 case TPM_CC_GetRandom:
121 return "GetRandom";
122#endif
123#ifdef TPM_CC_StirRandom
124 case TPM_CC_StirRandom:
125 return "StirRandom";
126#endif
127#ifdef TPM_CC_HMAC_Start
128 case TPM_CC_HMAC_Start:
129 return "HMAC_Start";
130#endif
131#ifdef TPM_CC_HashSequenceStart
132 case TPM_CC_HashSequenceStart:
133 return "HashSequenceStart";
134#endif
135#ifdef TPM_CC_SequenceUpdate
136 case TPM_CC_SequenceUpdate:
137 return "SequenceUpdate";
138#endif
139#ifdef TPM_CC_SequenceComplete
140 case TPM_CC_SequenceComplete:
141 return "SequenceComplete";
142#endif
143#ifdef TPM_CC_EventSequenceComplete
144 case TPM_CC_EventSequenceComplete:
145 return "EventSequenceComplete";
146#endif
147#ifdef TPM_CC_Certify
148 case TPM_CC_Certify:
149 return "Certify";
150#endif
151#ifdef TPM_CC_CertifyCreation
152 case TPM_CC_CertifyCreation:
153 return "CertifyCreation";
154#endif
155#ifdef TPM_CC_Quote
156 case TPM_CC_Quote:
157 return "Quote";
158#endif
159#ifdef TPM_CC_GetSessionAuditDigest
160 case TPM_CC_GetSessionAuditDigest:
161 return "GetSessionAuditDigest";
162#endif
163#ifdef TPM_CC_GetCommandAuditDigest
164 case TPM_CC_GetCommandAuditDigest:
165 return "GetCommandAuditDigest";
166#endif
167#ifdef TPM_CC_GetTime
168 case TPM_CC_GetTime:
169 return "GetTime";
170#endif
171#ifdef TPM_CC_Commit
172 case TPM_CC_Commit:
173 return "Commit";
174#endif
175#ifdef TPM_CC_EC_Ephemeral
176 case TPM_CC_EC_Ephemeral:
177 return "EC_Ephemeral";
178#endif
179#ifdef TPM_CC_VerifySignature
180 case TPM_CC_VerifySignature:
181 return "VerifySignature";
182#endif
183#ifdef TPM_CC_Sign
184 case TPM_CC_Sign:
185 return "Sign";
186#endif
187#ifdef TPM_CC_SetCommandCodeAuditStatus
188 case TPM_CC_SetCommandCodeAuditStatus:
189 return "SetCommandCodeAuditStatus";
190#endif
191#ifdef TPM_CC_PCR_Extend
192 case TPM_CC_PCR_Extend:
193 return "PCR_Extend";
194#endif
195#ifdef TPM_CC_PCR_Event
196 case TPM_CC_PCR_Event:
197 return "PCR_Event";
198#endif
199#ifdef TPM_CC_PCR_Read
200 case TPM_CC_PCR_Read:
201 return "PCR_Read";
202#endif
203#ifdef TPM_CC_PCR_Allocate
204 case TPM_CC_PCR_Allocate:
205 return "PCR_Allocate";
206#endif
207#ifdef TPM_CC_PCR_SetAuthPolicy
208 case TPM_CC_PCR_SetAuthPolicy:
209 return "PCR_SetAuthPolicy";
210#endif
211#ifdef TPM_CC_PCR_SetAuthValue
212 case TPM_CC_PCR_SetAuthValue:
213 return "PCR_SetAuthValue";
214#endif
215#ifdef TPM_CC_PCR_Reset
216 case TPM_CC_PCR_Reset:
217 return "PCR_Reset";
218#endif
219#ifdef TPM_CC_PolicySigned
220 case TPM_CC_PolicySigned:
221 return "PolicySigned";
222#endif
223#ifdef TPM_CC_PolicySecret
224 case TPM_CC_PolicySecret:
225 return "PolicySecret";
226#endif
227#ifdef TPM_CC_PolicyTicket
228 case TPM_CC_PolicyTicket:
229 return "PolicyTicket";
230#endif
231#ifdef TPM_CC_PolicyOR
232 case TPM_CC_PolicyOR:
233 return "PolicyOR";
234#endif
235#ifdef TPM_CC_PolicyPCR
236 case TPM_CC_PolicyPCR:
237 return "PolicyPCR";
238#endif
239#ifdef TPM_CC_PolicyLocality
240 case TPM_CC_PolicyLocality:
241 return "PolicyLocality";
242#endif
243#ifdef TPM_CC_PolicyNV
244 case TPM_CC_PolicyNV:
245 return "PolicyNV";
246#endif
247#ifdef TPM_CC_PolicyCounterTimer
248 case TPM_CC_PolicyCounterTimer:
249 return "PolicyCounterTimer";
250#endif
251#ifdef TPM_CC_PolicyCommandCode
252 case TPM_CC_PolicyCommandCode:
253 return "PolicyCommandCode";
254#endif
255#ifdef TPM_CC_PolicyPhysicalPresence
256 case TPM_CC_PolicyPhysicalPresence:
257 return "PolicyPhysicalPresence";
258#endif
259#ifdef TPM_CC_PolicyCpHash
260 case TPM_CC_PolicyCpHash:
261 return "PolicyCpHash";
262#endif
263#ifdef TPM_CC_PolicyNameHash
264 case TPM_CC_PolicyNameHash:
265 return "PolicyNameHash";
266#endif
267#ifdef TPM_CC_PolicyDuplicationSelect
268 case TPM_CC_PolicyDuplicationSelect:
269 return "PolicyDuplicationSelect";
270#endif
271#ifdef TPM_CC_PolicyAuthorize
272 case TPM_CC_PolicyAuthorize:
273 return "PolicyAuthorize";
274#endif
275#ifdef TPM_CC_PolicyAuthValue
276 case TPM_CC_PolicyAuthValue:
277 return "PolicyAuthValue";
278#endif
279#ifdef TPM_CC_PolicyPassword
280 case TPM_CC_PolicyPassword:
281 return "PolicyPassword";
282#endif
283#ifdef TPM_CC_PolicyGetDigest
284 case TPM_CC_PolicyGetDigest:
285 return "PolicyGetDigest";
286#endif
287#ifdef TPM_CC_PolicyNvWritten
288 case TPM_CC_PolicyNvWritten:
289 return "PolicyNvWritten";
290#endif
291#ifdef TPM_CC_CreatePrimary
292 case TPM_CC_CreatePrimary:
293 return "CreatePrimary";
294#endif
295#ifdef TPM_CC_HierarchyControl
296 case TPM_CC_HierarchyControl:
297 return "HierarchyControl";
298#endif
299#ifdef TPM_CC_SetPrimaryPolicy
300 case TPM_CC_SetPrimaryPolicy:
301 return "SetPrimaryPolicy";
302#endif
303#ifdef TPM_CC_ChangePPS
304 case TPM_CC_ChangePPS:
305 return "ChangePPS";
306#endif
307#ifdef TPM_CC_ChangeEPS
308 case TPM_CC_ChangeEPS:
309 return "ChangeEPS";
310#endif
311#ifdef TPM_CC_Clear
312 case TPM_CC_Clear:
313 return "Clear";
314#endif
315#ifdef TPM_CC_ClearControl
316 case TPM_CC_ClearControl:
317 return "ClearControl";
318#endif
319#ifdef TPM_CC_HierarchyChangeAuth
320 case TPM_CC_HierarchyChangeAuth:
321 return "HierarchyChangeAuth";
322#endif
323#ifdef TPM_CC_DictionaryAttackLockReset
324 case TPM_CC_DictionaryAttackLockReset:
325 return "DictionaryAttackLockReset";
326#endif
327#ifdef TPM_CC_DictionaryAttackParameters
328 case TPM_CC_DictionaryAttackParameters:
329 return "DictionaryAttackParameters";
330#endif
331#ifdef TPM_CC_PP_Commands
332 case TPM_CC_PP_Commands:
333 return "PP_Commands";
334#endif
335#ifdef TPM_CC_SetAlgorithmSet
336 case TPM_CC_SetAlgorithmSet:
337 return "SetAlgorithmSet";
338#endif
339#ifdef TPM_CC_FieldUpgradeStart
340 case TPM_CC_FieldUpgradeStart:
341 return "FieldUpgradeStart";
342#endif
343#ifdef TPM_CC_FieldUpgradeData
344 case TPM_CC_FieldUpgradeData:
345 return "FieldUpgradeData";
346#endif
347#ifdef TPM_CC_FirmwareRead
348 case TPM_CC_FirmwareRead:
349 return "FirmwareRead";
350#endif
351#ifdef TPM_CC_ContextSave
352 case TPM_CC_ContextSave:
353 return "ContextSave";
354#endif
355#ifdef TPM_CC_ContextLoad
356 case TPM_CC_ContextLoad:
357 return "ContextLoad";
358#endif
359#ifdef TPM_CC_FlushContext
360 case TPM_CC_FlushContext:
361 return "FlushContext";
362#endif
363#ifdef TPM_CC_EvictControl
364 case TPM_CC_EvictControl:
365 return "EvictControl";
366#endif
367#ifdef TPM_CC_ReadClock
368 case TPM_CC_ReadClock:
369 return "ReadClock";
370#endif
371#ifdef TPM_CC_ClockSet
372 case TPM_CC_ClockSet:
373 return "ClockSet";
374#endif
375#ifdef TPM_CC_ClockRateAdjust
376 case TPM_CC_ClockRateAdjust:
377 return "ClockRateAdjust";
378#endif
379#ifdef TPM_CC_GetCapability
380 case TPM_CC_GetCapability:
381 return "GetCapability";
382#endif
383#ifdef TPM_CC_TestParms
384 case TPM_CC_TestParms:
385 return "TestParms";
386#endif
387#ifdef TPM_CC_NV_DefineSpace
388 case TPM_CC_NV_DefineSpace:
389 return "NV_DefineSpace";
390#endif
391#ifdef TPM_CC_NV_UndefineSpace
392 case TPM_CC_NV_UndefineSpace:
393 return "NV_UndefineSpace";
394#endif
395#ifdef TPM_CC_NV_UndefineSpaceSpecial
396 case TPM_CC_NV_UndefineSpaceSpecial:
397 return "NV_UndefineSpaceSpecial";
398#endif
399#ifdef TPM_CC_NV_ReadPublic
400 case TPM_CC_NV_ReadPublic:
401 return "NV_ReadPublic";
402#endif
403#ifdef TPM_CC_NV_Write
404 case TPM_CC_NV_Write:
405 return "NV_Write";
406#endif
407#ifdef TPM_CC_NV_Increment
408 case TPM_CC_NV_Increment:
409 return "NV_Increment";
410#endif
411#ifdef TPM_CC_NV_Extend
412 case TPM_CC_NV_Extend:
413 return "NV_Extend";
414#endif
415#ifdef TPM_CC_NV_SetBits
416 case TPM_CC_NV_SetBits:
417 return "NV_SetBits";
418#endif
419#ifdef TPM_CC_NV_WriteLock
420 case TPM_CC_NV_WriteLock:
421 return "NV_WriteLock";
422#endif
423#ifdef TPM_CC_NV_GlobalWriteLock
424 case TPM_CC_NV_GlobalWriteLock:
425 return "NV_GlobalWriteLock";
426#endif
427#ifdef TPM_CC_NV_Read
428 case TPM_CC_NV_Read:
429 return "NV_Read";
430#endif
431#ifdef TPM_CC_NV_ReadLock
432 case TPM_CC_NV_ReadLock:
433 return "NV_ReadLock";
434#endif
435#ifdef TPM_CC_NV_ChangeAuth
436 case TPM_CC_NV_ChangeAuth:
437 return "NV_ChangeAuth";
438#endif
439#ifdef TPM_CC_NV_Certify
440 case TPM_CC_NV_Certify:
441 return "NV_Certify";
442#endif
443 default:
444 return "Unknown command";
445 }
446}