• Home
  • Raw
  • Download

Lines Matching refs:command

182     IFAPI_NV_Cmds * command = &context->nv_cmd;  in Fapi_NvExtend_Async()  local
184 memset(command, 0 ,sizeof(IFAPI_NV_Cmds)); in Fapi_NvExtend_Async()
191 command->data = in_data; in Fapi_NvExtend_Async()
192 strdup_check(command->nvPath, nvPath, r, error_cleanup); in Fapi_NvExtend_Async()
193 strdup_check(command->logData, logData, r, error_cleanup); in Fapi_NvExtend_Async()
194 command->numBytes = dataSize; in Fapi_NvExtend_Async()
201 r = ifapi_keystore_load_async(&context->keystore, &context->io, command->nvPath); in Fapi_NvExtend_Async()
202 goto_if_error2(r, "Could not open: %s", error_cleanup, command->nvPath); in Fapi_NvExtend_Async()
211 SAFE_FREE(command->data); in Fapi_NvExtend_Async()
212 SAFE_FREE(command->nvPath); in Fapi_NvExtend_Async()
213 SAFE_FREE(command->logData); in Fapi_NvExtend_Async()
265 IFAPI_NV_Cmds * command = &context->nv_cmd; in Fapi_NvExtend_Finish() local
267 ESYS_TR nvIndex = command->esys_handle; in Fapi_NvExtend_Finish()
268 const uint8_t *data = command->data; in Fapi_NvExtend_Finish()
269 IFAPI_OBJECT *object = &command->nv_object; in Fapi_NvExtend_Finish()
270 IFAPI_OBJECT *authObject = &command->auth_object; in Fapi_NvExtend_Finish()
271 IFAPI_EVENT *event = &command->pcr_event; in Fapi_NvExtend_Finish()
276 r = ifapi_keystore_check_writeable(&context->keystore, &context->io, command->nvPath); in Fapi_NvExtend_Finish()
285 command->nvPath); in Fapi_NvExtend_Finish()
292 nvIndex = command->nv_object.handle; in Fapi_NvExtend_Finish()
293 command->esys_handle = context->nv_cmd.nv_object.handle; in Fapi_NvExtend_Finish()
294 command->nv_obj = object->misc.nv; in Fapi_NvExtend_Finish()
309 command->auth_index = authIndex; in Fapi_NvExtend_Finish()
326 if (command->numBytes > TPM2_MAX_NV_BUFFER_SIZE) { in Fapi_NvExtend_Finish()
332 auxData->size = command->numBytes; in Fapi_NvExtend_Finish()
334 command->data_idx = auxData->size; in Fapi_NvExtend_Finish()
345 command->auth_index, in Fapi_NvExtend_Finish()
353 command->bytesRequested = auxData->size; in Fapi_NvExtend_Finish()
354 command->data = (uint8_t *)data; in Fapi_NvExtend_Finish()
364 command->numBytes -= context->nv_cmd.bytesRequested; in Fapi_NvExtend_Finish()
388 if (command->logData) { in Fapi_NvExtend_Finish()
389 strdup_check(event->sub_event.tss_event.event, command->logData, in Fapi_NvExtend_Finish()
396 if (command->nv_object.misc.nv.event_log) { in Fapi_NvExtend_Finish()
397 command->jso_event_log in Fapi_NvExtend_Finish()
398 = json_tokener_parse(command->nv_object.misc.nv.event_log); in Fapi_NvExtend_Finish()
399 goto_if_null2(command->jso_event_log, "Out of memory", r, in Fapi_NvExtend_Finish()
402 json_type jsoType = json_object_get_type(command->jso_event_log); in Fapi_NvExtend_Finish()
406 json_object_array_add(jsonArray, command->jso_event_log); in Fapi_NvExtend_Finish()
407 command->jso_event_log = jsonArray; in Fapi_NvExtend_Finish()
411 command->jso_event_log = json_object_new_array(); in Fapi_NvExtend_Finish()
413 command->pcr_event.recnum = in Fapi_NvExtend_Finish()
414 json_object_array_length(command->jso_event_log) + 1; in Fapi_NvExtend_Finish()
416 r = ifapi_json_IFAPI_EVENT_serialize(&command->pcr_event, &jso); in Fapi_NvExtend_Finish()
419 json_object_array_add(command->jso_event_log, jso); in Fapi_NvExtend_Finish()
422 json_object_to_json_string_ext(command->jso_event_log, in Fapi_NvExtend_Finish()
427 r = ifapi_esys_serialize_object(context->esys, &command->nv_object); in Fapi_NvExtend_Finish()
432 command->nvPath, in Fapi_NvExtend_Finish()
433 &command->nv_object); in Fapi_NvExtend_Finish()
436 command->nvPath); in Fapi_NvExtend_Finish()
462 if (command->jso_event_log) in Fapi_NvExtend_Finish()
463 json_object_put(command->jso_event_log); in Fapi_NvExtend_Finish()
473 SAFE_FREE(command->data); in Fapi_NvExtend_Finish()
474 SAFE_FREE(command->nvPath); in Fapi_NvExtend_Finish()
475 SAFE_FREE(command->logData); in Fapi_NvExtend_Finish()