Lines Matching refs:status

109     psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
121 status = PSA_SUCCESS;
123 status = PSA_ERROR_DOES_NOT_EXIST;
138 status = (slot_idx < MBEDTLS_PSA_KEY_SLOT_COUNT) ?
142 if (status == PSA_SUCCESS) {
143 status = psa_register_read(slot);
144 if (status == PSA_SUCCESS) {
149 return status;
180 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
185 status = PSA_ERROR_BAD_STATE;
216 status = psa_wipe_key_slot(selected_slot);
217 if (status != PSA_SUCCESS) {
223 status = psa_key_slot_state_transition(selected_slot, PSA_SLOT_EMPTY,
225 if (status != PSA_SUCCESS) {
235 status = PSA_ERROR_INSUFFICIENT_MEMORY;
241 return status;
247 psa_status_t status = PSA_SUCCESS;
251 status = psa_load_persistent_key(&slot->attr,
253 if (status != PSA_SUCCESS) {
266 status = PSA_ERROR_DATA_INVALID;
270 status = psa_copy_key_material_into_slot(
276 status = psa_copy_key_material_into_slot(slot, key_data, key_data_length);
277 if (status != PSA_SUCCESS) {
283 return status;
291 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
304 status = mbedtls_psa_platform_get_builtin_key(
306 if (status != PSA_SUCCESS) {
307 return status;
317 status = psa_driver_wrapper_get_builtin_key(
320 if (status != PSA_ERROR_BUFFER_TOO_SMALL) {
322 if (status == PSA_SUCCESS) {
323 status = PSA_ERROR_CORRUPTION_DETECTED;
325 return status;
330 status = psa_driver_wrapper_get_key_buffer_size(&attributes,
332 if (status != PSA_SUCCESS) {
333 return status;
338 status = psa_allocate_buffer_to_slot(slot, key_buffer_size);
339 if (status != PSA_SUCCESS) {
340 return status;
343 status = psa_driver_wrapper_get_builtin_key(
346 if (status != PSA_SUCCESS) {
354 if (status != PSA_SUCCESS) {
357 return status;
364 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
372 /* We need to set status as success, otherwise CORRUPTION_DETECTED
374 status = PSA_SUCCESS;
386 status = psa_get_and_lock_key_slot_in_memory(key, p_slot);
387 if (status != PSA_ERROR_DOES_NOT_EXIST) {
392 return status;
400 status = psa_reserve_free_key_slot(&volatile_key_id, p_slot);
401 if (status != PSA_SUCCESS) {
406 return status;
412 status = PSA_ERROR_DOES_NOT_EXIST;
415 status = psa_load_builtin_key_into_slot(*p_slot);
419 if (status == PSA_ERROR_DOES_NOT_EXIST) {
420 status = psa_load_persistent_key_into_slot(*p_slot);
424 if (status != PSA_SUCCESS) {
427 if (status == PSA_ERROR_DOES_NOT_EXIST) {
428 status = PSA_ERROR_INVALID_HANDLE;
436 status = psa_register_read(*p_slot);
440 status = PSA_ERROR_INVALID_HANDLE;
447 return status;
486 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
488 /* We need to set status as success, otherwise CORRUPTION_DETECTED
490 status = PSA_SUCCESS;
494 status = psa_unregister_read(slot);
499 return status;
550 psa_status_t status;
553 status = psa_get_and_lock_key_slot(key, &slot);
554 if (status != PSA_SUCCESS) {
556 if (status == PSA_ERROR_INVALID_HANDLE) {
557 status = PSA_ERROR_DOES_NOT_EXIST;
560 return status;
576 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
584 /* We need to set status as success, otherwise CORRUPTION_DETECTED
586 status = PSA_SUCCESS;
590 status = psa_get_and_lock_key_slot_in_memory(handle, &slot);
591 if (status != PSA_SUCCESS) {
592 if (status == PSA_ERROR_DOES_NOT_EXIST) {
593 status = PSA_ERROR_INVALID_HANDLE;
599 return status;
603 status = psa_wipe_key_slot(slot);
605 status = psa_unregister_read(slot);
612 return status;
617 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
621 /* We need to set status as success, otherwise CORRUPTION_DETECTED
623 status = PSA_SUCCESS;
627 status = psa_get_and_lock_key_slot_in_memory(key, &slot);
628 if (status != PSA_SUCCESS) {
633 return status;
638 status = psa_wipe_key_slot(slot);
640 status = psa_unregister_read(slot);
647 return status;