Lines Matching refs:command
164 IFAPI_Entity_ChangeAuth * command = &(context->cmd.Entity_ChangeAuth); in Fapi_ChangeAuth_Async() local
172 command->handle = ESYS_TR_NONE; in Fapi_ChangeAuth_Async()
173 memset(&command->object, 0, sizeof(IFAPI_OBJECT)); in Fapi_ChangeAuth_Async()
174 strdup_check(command->entityPath, entityPath, r, error_cleanup); in Fapi_ChangeAuth_Async()
176 strdup_check(command->authValue, authValue, r, error_cleanup); in Fapi_ChangeAuth_Async()
178 strdup_check(command->authValue, "", r, error_cleanup); in Fapi_ChangeAuth_Async()
180 command->handle = ESYS_TR_NONE; in Fapi_ChangeAuth_Async()
190 if (command->authValue) { in Fapi_ChangeAuth_Async()
191 if (strlen(command->authValue) > sizeof(TPMU_HA)) { in Fapi_ChangeAuth_Async()
197 command->newAuthValue.size = in Fapi_ChangeAuth_Async()
198 strlen(command->authValue); in Fapi_ChangeAuth_Async()
199 memcpy(&command->newAuthValue.buffer[0], in Fapi_ChangeAuth_Async()
200 command->authValue, in Fapi_ChangeAuth_Async()
201 command->newAuthValue.size); in Fapi_ChangeAuth_Async()
203 command->newAuthValue.size = 0; in Fapi_ChangeAuth_Async()
214 SAFE_FREE(command->entityPath); in Fapi_ChangeAuth_Async()
215 SAFE_FREE(command->authValue); in Fapi_ChangeAuth_Async()
261 IFAPI_Entity_ChangeAuth * command = &(context->cmd.Entity_ChangeAuth); in Fapi_ChangeAuth_Finish() local
262 IFAPI_OBJECT * object = &command->object; in Fapi_ChangeAuth_Finish()
268 r = ifapi_profiles_get(&context->profiles, command->entityPath, in Fapi_ChangeAuth_Finish()
280 if (ifapi_path_type_p(command->entityPath, in Fapi_ChangeAuth_Finish()
283 command->entityPath); in Fapi_ChangeAuth_Finish()
285 command->entityPath); in Fapi_ChangeAuth_Finish()
293 command->hierarchy_handle = in Fapi_ChangeAuth_Finish()
294 ifapi_get_hierary_handle(command->entityPath); in Fapi_ChangeAuth_Finish()
296 if (command->hierarchy_handle) { in Fapi_ChangeAuth_Finish()
301 command->entityPath); in Fapi_ChangeAuth_Finish()
303 command->entityPath); in Fapi_ChangeAuth_Finish()
310 r = ifapi_load_keys_async(context, command->entityPath); in Fapi_ChangeAuth_Finish()
317 &command->handle, in Fapi_ChangeAuth_Finish()
318 &command->key_object); in Fapi_ChangeAuth_Finish()
325 object = command->key_object; in Fapi_ChangeAuth_Finish()
332 command->handle, in Fapi_ChangeAuth_Finish()
336 &command->newAuthValue); in Fapi_ChangeAuth_Finish()
343 &command->newPrivate); in Fapi_ChangeAuth_Finish()
348 object = command->key_object; in Fapi_ChangeAuth_Finish()
349 object->misc.key.private.size = command->newPrivate->size; in Fapi_ChangeAuth_Finish()
359 &command->newPrivate->buffer[0], in Fapi_ChangeAuth_Finish()
361 free(command->newPrivate); in Fapi_ChangeAuth_Finish()
365 command->handle); in Fapi_ChangeAuth_Finish()
368 command->handle = ESYS_TR_NONE; in Fapi_ChangeAuth_Finish()
390 object = command->key_object; in Fapi_ChangeAuth_Finish()
392 if (strlen(command->authValue) > 0) in Fapi_ChangeAuth_Finish()
405 command->entityPath, in Fapi_ChangeAuth_Finish()
408 command->entityPath); in Fapi_ChangeAuth_Finish()
433 &command->object); in Fapi_ChangeAuth_Finish()
438 r = ifapi_initialize_object(context->esys, &command->object); in Fapi_ChangeAuth_Finish()
456 &command->newAuthValue); in Fapi_ChangeAuth_Finish()
469 if (strlen(command->authValue) > 0) in Fapi_ChangeAuth_Finish()
488 r = ifapi_initialize_object(context->esys, &command->object); in Fapi_ChangeAuth_Finish()
491 command->object.handle in Fapi_ChangeAuth_Finish()
492 = command->hierarchy_handle; in Fapi_ChangeAuth_Finish()
498 r = ifapi_authorize_object(context, &command->object, &auth_session); in Fapi_ChangeAuth_Finish()
507 command->hierarchy_handle, in Fapi_ChangeAuth_Finish()
508 &command->object, in Fapi_ChangeAuth_Finish()
509 &command->newAuthValue); in Fapi_ChangeAuth_Finish()
525 if (command->handle != ESYS_TR_NONE) in Fapi_ChangeAuth_Finish()
526 Esys_FlushContext(context->esys, command->handle); in Fapi_ChangeAuth_Finish()
532 ifapi_cleanup_ifapi_object(command->key_object); in Fapi_ChangeAuth_Finish()
533 SAFE_FREE(command->entityPath); in Fapi_ChangeAuth_Finish()
534 SAFE_FREE(command->authValue); in Fapi_ChangeAuth_Finish()