Lines Matching full:rc
30 TSS2_RC rc, rc2; in test_invoke() local
62 rc = Tss2_Sys_GetTctiContext(sapi_context, &tcti_ctx); in test_invoke()
63 if (rc) { in test_invoke()
64 LOG_ERROR("Tss2_Sys_GetTctiContext failed 0x%" PRIx32, rc); in test_invoke()
65 return rc; in test_invoke()
75 rc = Tss2_Sys_NV_DefineSpace(sapi_context, TPM2_RH_OWNER, &req_auth, in test_invoke()
77 if (rc) { in test_invoke()
78 LOG_ERROR("Tss2_Sys_NV_DefineSpace failed 0x%" PRIx32, rc); in test_invoke()
79 return rc; in test_invoke()
87 rc = create_auth_session(&session, TPM2_RH_NULL, 0, in test_invoke()
90 if (rc) { in test_invoke()
91 LOG_ERROR("create_auth_session failed 0x%" PRIx32, rc); in test_invoke()
98 rc = Tss2_Sys_NV_Write_Prepare(sapi_context, nv_index, nv_index, in test_invoke()
100 if (rc) { in test_invoke()
101 LOG_ERROR("Tss2_Sys_NV_Write_Prepare failed 0x%" PRIx32, rc); in test_invoke()
120 rc = Tss2_Sys_SetCmdAuths(sapi_context, &req_auth); in test_invoke()
121 if (rc) { in test_invoke()
122 LOG_ERROR("Tss2_Sys_SetCmdAuths failed 0x%" PRIx32, rc); in test_invoke()
126 rc = Tss2_Sys_GetDecryptParam(sapi_context, &decrypt_param_size, &decrypt_param_ptr); in test_invoke()
127 if (rc) { in test_invoke()
128 LOG_ERROR("Tss2_Sys_GetDecryptParam failed 0x%" PRIx32, rc); in test_invoke()
133 rc = 99; in test_invoke()
140 rc = encrypt_command_param(session, &encrypted_param, in test_invoke()
142 if (rc) { in test_invoke()
143 LOG_ERROR("encrypt_command_param failed 0x%" PRIx32, rc); in test_invoke()
147 rc = Tss2_Sys_SetDecryptParam(sapi_context, encrypted_param.size, in test_invoke()
149 if (rc) { in test_invoke()
150 LOG_ERROR("Tss2_Sys_SetDecryptParam failed 0x%" PRIx32, rc); in test_invoke()
154 rc = Tss2_Sys_Execute(sapi_context); in test_invoke()
155 if (rc) { in test_invoke()
156 if ((rc & 0x0000ffff) == TPM2_RC_RETRY) { in test_invoke()
157 LOG_INFO("Tss2_Sys_Execute returned retry 0x%" PRIx32, rc); in test_invoke()
163 LOG_ERROR("Tss2_Sys_Execute failed 0x%" PRIx32, rc); in test_invoke()
167 rc = Tss2_Sys_GetRspAuths(sapi_context, &resp_auth); in test_invoke()
168 if (rc) { in test_invoke()
169 LOG_ERROR("Tss2_Sys_GetRspAuths failed 0x%" PRIx32, rc); in test_invoke()
181 rc = Tss2_Sys_NV_Read(sapi_context, nv_index, nv_index, &req_auth, in test_invoke()
183 if (rc) { in test_invoke()
184 LOG_ERROR("Tss2_Sys_NV_Read failed 0x%" PRIx32, rc); in test_invoke()
194 rc = 99; in test_invoke()
198 rc = Tss2_Sys_NV_Read_Prepare(sapi_context, nv_index, nv_index, TEST_DATA_LEN, 0); in test_invoke()
199 if (rc) { in test_invoke()
200 LOG_ERROR("Tss2_Sys_NV_Read_Prepare failed 0x%" PRIx32, rc); in test_invoke()
211 rc = Tss2_Sys_SetCmdAuths(sapi_context, &req_auth); in test_invoke()
212 if (rc) { in test_invoke()
213 LOG_ERROR("Tss2_Sys_SetCmdAuths failed 0x%" PRIx32, rc); in test_invoke()
217 rc = Tss2_Sys_Execute(sapi_context); in test_invoke()
218 if (rc) { in test_invoke()
219 LOG_ERROR("Tss2_Sys_Execute failed 0x%" PRIx32, rc); in test_invoke()
223 rc = Tss2_Sys_GetEncryptParam(sapi_context, &encrypt_param_size, &encrypt_param_ptr); in test_invoke()
224 if (rc) { in test_invoke()
225 LOG_ERROR("Tss2_Sys_GetEncryptParam failed 0x%" PRIx32, rc); in test_invoke()
229 rc = Tss2_Sys_GetRspAuths(sapi_context, &resp_auth); in test_invoke()
230 if (rc) { in test_invoke()
231 LOG_ERROR("Tss2_Sys_GetRspAuths failed 0x%" PRIx32, rc); in test_invoke()
240 rc = decrypt_response_param(session, &decrypted_param, in test_invoke()
242 if (rc) { in test_invoke()
243 LOG_ERROR("decrypt_response_param failed 0x%" PRIx32, rc); in test_invoke()
249 rc = Tss2_Sys_SetEncryptParam(sapi_context, decrypted_param.size, in test_invoke()
251 if (rc) { in test_invoke()
252 LOG_ERROR("Tss2_Sys_SetEncryptParam failed 0x%" PRIx32, rc); in test_invoke()
256 rc = Tss2_Sys_NV_Read_Complete(sapi_context, &data_read); in test_invoke()
257 if (rc) { in test_invoke()
258 LOG_ERROR("Tss2_Sys_NV_Read_Complete failed 0x%" PRIx32, rc); in test_invoke()
266 rc = 99; in test_invoke()
270 rc = Tss2_Sys_FlushContext(sapi_context, session->sessionHandle); in test_invoke()
271 if (rc) in test_invoke()
272 LOG_ERROR("Tss2_Sys_FlushContext failed 0x%" PRIx32, rc); in test_invoke()
283 LOG_ERROR("Tss2_Sys_NV_UndefineSpace failed 0x%" PRIx32, rc); in test_invoke()
285 if (rc == 0) in test_invoke()
288 return rc; in test_invoke()