xref: /netbsd-src/crypto/external/cpl/trousers/dist/src/include/tss/tcs_error.h (revision 2d5f7628c5531eb583b9313ac2fd1cf8582b4479)
1 /*++
2 
3 TSS Core Service error return codes
4 
5 --*/
6 
7 #ifndef __TCS_ERROR_H__
8 #define __TCS_ERROR_H__
9 
10 
11 #ifndef TSS_E_BASE
12 #define TSS_E_BASE      0x00000000L
13 #endif // TSS_E_BASE
14 
15 // The context handle supplied is invalid.
16 #define TCS_E_INVALID_CONTEXTHANDLE  (UINT32)(TSS_E_BASE + 0x0C1L)
17 
18 // The key handle supplied is invalid.
19 #define TCS_E_INVALID_KEYHANDLE  (UINT32)(TSS_E_BASE + 0x0C2L)
20 
21 // The authorization session handle supplied is invalid.
22 #define TCS_E_INVALID_AUTHHANDLE  (UINT32)(TSS_E_BASE + 0x0C3L)
23 
24 // the auth session has been closed by the TPM
25 #define TCS_E_INVALID_AUTHSESSION  (UINT32)(TSS_E_BASE + 0x0C4L)
26 
27 // the key has been unloaded
28 #define TCS_E_INVALID_KEY   (UINT32)(TSS_E_BASE + 0x0C5L)
29 
30 // Key addressed by the application key handle does not match the key addressed
31 // by the given UUID.
32 #define TCS_E_KEY_MISMATCH   (UINT32)(TSS_E_BASE + 0x0C8L)
33 
34 // Key adressed by Key's UUID cannot be loaded because one of the required
35 // parent keys needs authorization.
36 #define TCS_E_KM_LOADFAILED   (UINT32)(TSS_E_BASE + 0x0CAL)
37 
38 // The Key Cache Manager could not reload the key into the TPM.
39 #define TCS_E_KEY_CONTEXT_RELOAD  (UINT32)(TSS_E_BASE + 0x0CCL)
40 
41 // Bad memory index
42 #define TCS_E_BAD_INDEX                           (UINT32)(TSS_E_BASE + 0x0CDL)
43 
44 
45 // These TCS_E_ macros are defined by name in the TSS spec, however
46 // they are defined to have the same values as the TSS_E_ equivalents.
47 #define TCS_SUCCESS                        TSS_SUCCESS
48 #define TCS_E_KEY_ALREADY_REGISTERED       TSS_E_KEY_ALREADY_REGISTERED
49 #define TCS_E_KEY_NOT_REGISTERED           TSS_E_KEY_NOT_REGISTERED
50 #define TCS_E_BAD_PARAMETER                TSS_E_BAD_PARAMETER
51 #define TCS_E_OUTOFMEMORY                  TSS_E_OUTOFMEMORY
52 #define TCS_E_SIZE                         TSS_E_SIZE
53 #define TCS_E_NOTIMPL                      TSS_E_NOTIMPL
54 #define TCS_E_INTERNAL_ERROR               TSS_E_INTERNAL_ERROR
55 
56 #endif // __TCS_ERROR_H__
57