Lines Matching refs:trunks
27 const trunks::TPM_RC kFormatOneErrorMask = 0x0BF;
29 const trunks::TPM_RC kFormatOneSubjectMask = 0x700;
30 const trunks::TPM_RC kLayerMask = 0xFFFFF000;
33 std::string GetErrorStringInternal(trunks::TPM_RC error) { in GetErrorStringInternal()
35 case trunks::TPM_RC_SUCCESS: return "TPM_RC_SUCCESS"; in GetErrorStringInternal()
36 case trunks::TPM_RC_BAD_TAG: return "TPM_RC_BAD_TAG"; in GetErrorStringInternal()
37 case trunks::TPM_RC_INITIALIZE: return "TPM_RC_INITIALIZE"; in GetErrorStringInternal()
38 case trunks::TPM_RC_FAILURE: return "TPM_RC_FAILURE"; in GetErrorStringInternal()
39 case trunks::TPM_RC_SEQUENCE: return "TPM_RC_SEQUENCE"; in GetErrorStringInternal()
40 case trunks::TPM_RC_PRIVATE: return "TPM_RC_PRIVATE"; in GetErrorStringInternal()
41 case trunks::TPM_RC_HMAC: return "TPM_RC_HMAC"; in GetErrorStringInternal()
42 case trunks::TPM_RC_DISABLED: return "TPM_RC_DISABLED"; in GetErrorStringInternal()
43 case trunks::TPM_RC_EXCLUSIVE: return "TPM_RC_EXCLUSIVE"; in GetErrorStringInternal()
44 case trunks::TPM_RC_AUTH_TYPE: return "TPM_RC_AUTH_TYPE"; in GetErrorStringInternal()
45 case trunks::TPM_RC_AUTH_MISSING: return "TPM_RC_AUTH_MISSING"; in GetErrorStringInternal()
46 case trunks::TPM_RC_POLICY: return "TPM_RC_POLICY"; in GetErrorStringInternal()
47 case trunks::TPM_RC_PCR: return "TPM_RC_PCR"; in GetErrorStringInternal()
48 case trunks::TPM_RC_PCR_CHANGED: return "TPM_RC_PCR_CHANGED"; in GetErrorStringInternal()
49 case trunks::TPM_RC_UPGRADE: return "TPM_RC_UPGRADE"; in GetErrorStringInternal()
50 case trunks::TPM_RC_TOO_MANY_CONTEXTS: return "TPM_RC_TOO_MANY_CONTEXTS"; in GetErrorStringInternal()
51 case trunks::TPM_RC_AUTH_UNAVAILABLE: return "TPM_RC_AUTH_UNAVAILABLE"; in GetErrorStringInternal()
52 case trunks::TPM_RC_REBOOT: return "TPM_RC_REBOOT"; in GetErrorStringInternal()
53 case trunks::TPM_RC_UNBALANCED: return "TPM_RC_UNBALANCED"; in GetErrorStringInternal()
54 case trunks::TPM_RC_COMMAND_SIZE: return "TPM_RC_COMMAND_SIZE"; in GetErrorStringInternal()
55 case trunks::TPM_RC_COMMAND_CODE: return "TPM_RC_COMMAND_CODE"; in GetErrorStringInternal()
56 case trunks::TPM_RC_AUTHSIZE: return "TPM_RC_AUTHSIZE"; in GetErrorStringInternal()
57 case trunks::TPM_RC_AUTH_CONTEXT: return "TPM_RC_AUTH_CONTEXT"; in GetErrorStringInternal()
58 case trunks::TPM_RC_NV_RANGE: return "TPM_RC_NV_RANGE"; in GetErrorStringInternal()
59 case trunks::TPM_RC_NV_SIZE: return "TPM_RC_NV_SIZE"; in GetErrorStringInternal()
60 case trunks::TPM_RC_NV_LOCKED: return "TPM_RC_NV_LOCKED"; in GetErrorStringInternal()
61 case trunks::TPM_RC_NV_AUTHORIZATION: return "TPM_RC_NV_AUTHORIZATION"; in GetErrorStringInternal()
62 case trunks::TPM_RC_NV_UNINITIALIZED: return "TPM_RC_NV_UNINITIALIZED"; in GetErrorStringInternal()
63 case trunks::TPM_RC_NV_SPACE: return "TPM_RC_NV_SPACE"; in GetErrorStringInternal()
64 case trunks::TPM_RC_NV_DEFINED: return "TPM_RC_NV_DEFINED"; in GetErrorStringInternal()
65 case trunks::TPM_RC_BAD_CONTEXT: return "TPM_RC_BAD_CONTEXT"; in GetErrorStringInternal()
66 case trunks::TPM_RC_CPHASH: return "TPM_RC_CPHASH"; in GetErrorStringInternal()
67 case trunks::TPM_RC_PARENT: return "TPM_RC_PARENT"; in GetErrorStringInternal()
68 case trunks::TPM_RC_NEEDS_TEST: return "TPM_RC_NEEDS_TEST"; in GetErrorStringInternal()
69 case trunks::TPM_RC_NO_RESULT: return "TPM_RC_NO_RESULT"; in GetErrorStringInternal()
70 case trunks::TPM_RC_SENSITIVE: return "TPM_RC_SENSITIVE"; in GetErrorStringInternal()
71 case trunks::TPM_RC_ASYMMETRIC: return "TPM_RC_ASYMMETRIC"; in GetErrorStringInternal()
72 case trunks::TPM_RC_ATTRIBUTES: return "TPM_RC_ATTRIBUTES"; in GetErrorStringInternal()
73 case trunks::TPM_RC_HASH: return "TPM_RC_HASH"; in GetErrorStringInternal()
74 case trunks::TPM_RC_VALUE: return "TPM_RC_VALUE"; in GetErrorStringInternal()
75 case trunks::TPM_RC_HIERARCHY: return "TPM_RC_HIERARCHY"; in GetErrorStringInternal()
76 case trunks::TPM_RC_KEY_SIZE: return "TPM_RC_KEY_SIZE"; in GetErrorStringInternal()
77 case trunks::TPM_RC_MGF: return "TPM_RC_MGF"; in GetErrorStringInternal()
78 case trunks::TPM_RC_MODE: return "TPM_RC_MODE"; in GetErrorStringInternal()
79 case trunks::TPM_RC_TYPE: return "TPM_RC_TYPE"; in GetErrorStringInternal()
80 case trunks::TPM_RC_HANDLE: return "TPM_RC_HANDLE"; in GetErrorStringInternal()
81 case trunks::TPM_RC_KDF: return "TPM_RC_KDF"; in GetErrorStringInternal()
82 case trunks::TPM_RC_RANGE: return "TPM_RC_RANGE"; in GetErrorStringInternal()
83 case trunks::TPM_RC_AUTH_FAIL: return "TPM_RC_AUTH_FAIL"; in GetErrorStringInternal()
84 case trunks::TPM_RC_NONCE: return "TPM_RC_NONCE"; in GetErrorStringInternal()
85 case trunks::TPM_RC_PP: return "TPM_RC_PP"; in GetErrorStringInternal()
86 case trunks::TPM_RC_SCHEME: return "TPM_RC_SCHEME"; in GetErrorStringInternal()
87 case trunks::TPM_RC_SIZE: return "TPM_RC_SIZE"; in GetErrorStringInternal()
88 case trunks::TPM_RC_SYMMETRIC: return "TPM_RC_SYMMETRIC"; in GetErrorStringInternal()
89 case trunks::TPM_RC_TAG: return "TPM_RC_TAG"; in GetErrorStringInternal()
90 case trunks::TPM_RC_SELECTOR: return "TPM_RC_SELECTOR"; in GetErrorStringInternal()
91 case trunks::TPM_RC_INSUFFICIENT: return "TPM_RC_INSUFFICIENT"; in GetErrorStringInternal()
92 case trunks::TPM_RC_SIGNATURE: return "TPM_RC_SIGNATURE"; in GetErrorStringInternal()
93 case trunks::TPM_RC_KEY: return "TPM_RC_KEY"; in GetErrorStringInternal()
94 case trunks::TPM_RC_POLICY_FAIL: return "TPM_RC_POLICY_FAIL"; in GetErrorStringInternal()
95 case trunks::TPM_RC_INTEGRITY: return "TPM_RC_INTEGRITY"; in GetErrorStringInternal()
96 case trunks::TPM_RC_TICKET: return "TPM_RC_TICKET"; in GetErrorStringInternal()
97 case trunks::TPM_RC_RESERVED_BITS: return "TPM_RC_RESERVED_BITS"; in GetErrorStringInternal()
98 case trunks::TPM_RC_BAD_AUTH: return "TPM_RC_BAD_AUTH"; in GetErrorStringInternal()
99 case trunks::TPM_RC_EXPIRED: return "TPM_RC_EXPIRED"; in GetErrorStringInternal()
100 case trunks::TPM_RC_POLICY_CC: return "TPM_RC_POLICY_CC"; in GetErrorStringInternal()
101 case trunks::TPM_RC_BINDING: return "TPM_RC_BINDING"; in GetErrorStringInternal()
102 case trunks::TPM_RC_CURVE: return "TPM_RC_CURVE"; in GetErrorStringInternal()
103 case trunks::TPM_RC_ECC_POINT: return "TPM_RC_ECC_POINT"; in GetErrorStringInternal()
104 case trunks::TPM_RC_CONTEXT_GAP: return "TPM_RC_CONTEXT_GAP"; in GetErrorStringInternal()
105 case trunks::TPM_RC_OBJECT_MEMORY: return "TPM_RC_OBJECT_MEMORY"; in GetErrorStringInternal()
106 case trunks::TPM_RC_SESSION_MEMORY: return "TPM_RC_SESSION_MEMORY"; in GetErrorStringInternal()
107 case trunks::TPM_RC_MEMORY: return "TPM_RC_MEMORY"; in GetErrorStringInternal()
108 case trunks::TPM_RC_SESSION_HANDLES: return "TPM_RC_SESSION_HANDLES"; in GetErrorStringInternal()
109 case trunks::TPM_RC_OBJECT_HANDLES: return "TPM_RC_OBJECT_HANDLES"; in GetErrorStringInternal()
110 case trunks::TPM_RC_LOCALITY: return "TPM_RC_LOCALITY"; in GetErrorStringInternal()
111 case trunks::TPM_RC_YIELDED: return "TPM_RC_YIELDED"; in GetErrorStringInternal()
112 case trunks::TPM_RC_CANCELED: return "TPM_RC_CANCELED"; in GetErrorStringInternal()
113 case trunks::TPM_RC_TESTING: return "TPM_RC_TESTING"; in GetErrorStringInternal()
114 case trunks::TPM_RC_REFERENCE_H0: return "TPM_RC_REFERENCE_H0"; in GetErrorStringInternal()
115 case trunks::TPM_RC_REFERENCE_H1: return "TPM_RC_REFERENCE_H1"; in GetErrorStringInternal()
116 case trunks::TPM_RC_REFERENCE_H2: return "TPM_RC_REFERENCE_H2"; in GetErrorStringInternal()
117 case trunks::TPM_RC_REFERENCE_H3: return "TPM_RC_REFERENCE_H3"; in GetErrorStringInternal()
118 case trunks::TPM_RC_REFERENCE_H4: return "TPM_RC_REFERENCE_H4"; in GetErrorStringInternal()
119 case trunks::TPM_RC_REFERENCE_H5: return "TPM_RC_REFERENCE_H5"; in GetErrorStringInternal()
120 case trunks::TPM_RC_REFERENCE_H6: return "TPM_RC_REFERENCE_H6"; in GetErrorStringInternal()
121 case trunks::TPM_RC_REFERENCE_S0: return "TPM_RC_REFERENCE_S0"; in GetErrorStringInternal()
122 case trunks::TPM_RC_REFERENCE_S1: return "TPM_RC_REFERENCE_S1"; in GetErrorStringInternal()
123 case trunks::TPM_RC_REFERENCE_S2: return "TPM_RC_REFERENCE_S2"; in GetErrorStringInternal()
124 case trunks::TPM_RC_REFERENCE_S3: return "TPM_RC_REFERENCE_S3"; in GetErrorStringInternal()
125 case trunks::TPM_RC_REFERENCE_S4: return "TPM_RC_REFERENCE_S4"; in GetErrorStringInternal()
126 case trunks::TPM_RC_REFERENCE_S5: return "TPM_RC_REFERENCE_S5"; in GetErrorStringInternal()
127 case trunks::TPM_RC_REFERENCE_S6: return "TPM_RC_REFERENCE_S6"; in GetErrorStringInternal()
128 case trunks::TPM_RC_NV_RATE: return "TPM_RC_NV_RATE"; in GetErrorStringInternal()
129 case trunks::TPM_RC_LOCKOUT: return "TPM_RC_LOCKOUT"; in GetErrorStringInternal()
130 case trunks::TPM_RC_RETRY: return "TPM_RC_RETRY"; in GetErrorStringInternal()
131 case trunks::TPM_RC_NV_UNAVAILABLE: return "TPM_RC_NV_UNAVAILABLE"; in GetErrorStringInternal()
132 case trunks::TPM_RC_NOT_USED: return "TPM_RC_NOT_USED"; in GetErrorStringInternal()
133 case trunks::TRUNKS_RC_AUTHORIZATION_FAILED: in GetErrorStringInternal()
135 case trunks::TRUNKS_RC_ENCRYPTION_FAILED: in GetErrorStringInternal()
137 case trunks::TRUNKS_RC_READ_ERROR: return "TRUNKS_RC_READ_ERROR"; in GetErrorStringInternal()
138 case trunks::TRUNKS_RC_WRITE_ERROR: return "TRUNKS_RC_WRITE_ERROR"; in GetErrorStringInternal()
139 case trunks::TRUNKS_RC_IPC_ERROR: return "TRUNKS_RC_IPC_ERROR"; in GetErrorStringInternal()
140 case trunks::TCTI_RC_TRY_AGAIN: return "TCTI_RC_TRY_AGAIN"; in GetErrorStringInternal()
141 case trunks::TCTI_RC_GENERAL_FAILURE: return "TCTI_RC_GENERAL_FAILURE"; in GetErrorStringInternal()
142 case trunks::TCTI_RC_BAD_CONTEXT: return "TCTI_RC_BAD_CONTEXT"; in GetErrorStringInternal()
143 case trunks::TCTI_RC_WRONG_ABI_VERSION: return "TCTI_RC_WRONG_ABI_VERSION"; in GetErrorStringInternal()
144 case trunks::TCTI_RC_NOT_IMPLEMENTED: return "TCTI_RC_NOT_IMPLEMENTED"; in GetErrorStringInternal()
145 case trunks::TCTI_RC_BAD_PARAMETER: return "TCTI_RC_BAD_PARAMETER"; in GetErrorStringInternal()
146 case trunks::TCTI_RC_INSUFFICIENT_BUFFER: in GetErrorStringInternal()
148 case trunks::TCTI_RC_NO_CONNECTION: return "TCTI_RC_NO_CONNECTION"; in GetErrorStringInternal()
149 case trunks::TCTI_RC_DRIVER_NOT_FOUND: return "TCTI_RC_DRIVER_NOT_FOUND"; in GetErrorStringInternal()
150 case trunks::TCTI_RC_DRIVERINFO_NOT_FOUND: in GetErrorStringInternal()
152 case trunks::TCTI_RC_NO_RESPONSE: return "TCTI_RC_NO_RESPONSE"; in GetErrorStringInternal()
153 case trunks::TCTI_RC_BAD_VALUE: return "TCTI_RC_BAD_VALUE"; in GetErrorStringInternal()
154 case trunks::SAPI_RC_INVALID_SESSIONS: return "SAPI_RC_INVALID_SESSIONS"; in GetErrorStringInternal()
155 case trunks::SAPI_RC_ABI_MISMATCH: return "SAPI_RC_ABI_MISMATCH"; in GetErrorStringInternal()
156 case trunks::SAPI_RC_INSUFFICIENT_BUFFER: in GetErrorStringInternal()
158 case trunks::SAPI_RC_BAD_PARAMETER: return "SAPI_RC_BAD_PARAMETER"; in GetErrorStringInternal()
159 case trunks::SAPI_RC_BAD_SEQUENCE: return "SAPI_RC_BAD_SEQUENCE"; in GetErrorStringInternal()
160 case trunks::SAPI_RC_NO_DECRYPT_PARAM: return "SAPI_RC_NO_DECRYPT_PARAM"; in GetErrorStringInternal()
161 case trunks::SAPI_RC_NO_ENCRYPT_PARAM: return "SAPI_RC_NO_ENCRYPT_PARAM"; in GetErrorStringInternal()
162 case trunks::SAPI_RC_NO_RESPONSE_RECEIVED: in GetErrorStringInternal()
164 case trunks::SAPI_RC_BAD_SIZE: return "SAPI_RC_BAD_SIZE"; in GetErrorStringInternal()
165 case trunks::SAPI_RC_CORRUPTED_DATA: return "SAPI_RC_CORRUPTED_DATA"; in GetErrorStringInternal()
166 case trunks::SAPI_RC_INSUFFICIENT_CONTEXT: in GetErrorStringInternal()
168 case trunks::SAPI_RC_INSUFFICIENT_RESPONSE: in GetErrorStringInternal()
170 case trunks::SAPI_RC_INCOMPATIBLE_TCTI: return "SAPI_RC_INCOMPATIBLE_TCTI"; in GetErrorStringInternal()
171 case trunks::SAPI_RC_MALFORMED_RESPONSE: in GetErrorStringInternal()
173 case trunks::SAPI_RC_BAD_TCTI_STRUCTURE: in GetErrorStringInternal()
181 bool IsFormatOne(trunks::TPM_RC error) { in IsFormatOne()
182 return (error & kLayerMask) == 0 && (error & trunks::RC_FMT1) != 0; in IsFormatOne()
187 namespace trunks { namespace