mirror of https://github.com/ARMmbed/mbed-os.git
Fix SPM returning the wrong value
parent
31da50e8fa
commit
d0dae03d01
|
@ -142,7 +142,7 @@ psa_status_t psa_mac_update(psa_mac_operation_t *operation,
|
|||
};
|
||||
|
||||
if (operation->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err = psa_call(operation->handle, in_vec, 2, NULL, 0);
|
||||
|
@ -169,7 +169,7 @@ psa_status_t psa_mac_sign_finish(psa_mac_operation_t *operation,
|
|||
psa_outvec out_vec[2] = { { mac, mac_size }, { mac_length, sizeof(*mac_length) } };
|
||||
|
||||
if (operation->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err_call = psa_call(operation->handle, in_vec, 2, out_vec, 2);
|
||||
|
@ -198,7 +198,7 @@ psa_status_t psa_mac_verify_finish(psa_mac_operation_t *operation,
|
|||
};
|
||||
|
||||
if (operation->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err_call = psa_call(operation->handle, in_vec, 3, NULL, 0);
|
||||
|
@ -279,7 +279,7 @@ psa_status_t psa_hash_update(psa_hash_operation_t *operation,
|
|||
};
|
||||
|
||||
if (operation->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err = psa_call(operation->handle, in_vec, 2, NULL, 0);
|
||||
|
@ -308,7 +308,7 @@ psa_status_t psa_hash_finish(psa_hash_operation_t *operation,
|
|||
};
|
||||
|
||||
if (operation->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err_call = psa_call(operation->handle, in_vec, 2, out_vec, 2);
|
||||
|
@ -337,7 +337,7 @@ psa_status_t psa_hash_verify(psa_hash_operation_t *operation,
|
|||
};
|
||||
|
||||
if (operation->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err_call = psa_call(operation->handle, in_vec, 3, NULL, 0);
|
||||
|
@ -1213,7 +1213,7 @@ psa_status_t psa_get_generator_capacity(const psa_crypto_generator_t *generator,
|
|||
psa_outvec out_vec = { capacity, sizeof(*capacity) };
|
||||
|
||||
if (generator->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err_call = psa_call(generator->handle, &in_vec, 1, &out_vec, 1);
|
||||
|
@ -1235,7 +1235,7 @@ psa_status_t psa_generator_read(psa_crypto_generator_t *generator,
|
|||
psa_outvec out_vec = { output, output_length };
|
||||
|
||||
if (generator->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err_call = psa_call(generator->handle, &in_vec, 1, &out_vec, 1);
|
||||
|
@ -1261,7 +1261,7 @@ psa_status_t psa_generator_import_key(psa_key_handle_t key_handle,
|
|||
};
|
||||
|
||||
if (generator->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err_call = psa_call(generator->handle, in_vec, 3, NULL, 0);
|
||||
|
@ -1439,7 +1439,7 @@ psa_status_t psa_cipher_generate_iv(psa_cipher_operation_t *operation,
|
|||
};
|
||||
|
||||
if (operation->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err = psa_call(operation->handle, &in_vec, 1, out_vec, 2);
|
||||
|
@ -1467,7 +1467,7 @@ psa_status_t psa_cipher_set_iv(psa_cipher_operation_t *operation,
|
|||
};
|
||||
|
||||
if (operation->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err = psa_call(operation->handle, in_vec, 2, NULL, 0);
|
||||
|
@ -1507,7 +1507,7 @@ psa_status_t psa_cipher_update(psa_cipher_operation_t *operation,
|
|||
};
|
||||
|
||||
if (operation->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err = psa_call(operation->handle, in_vec, 2, out_vec, 2);
|
||||
|
@ -1542,7 +1542,7 @@ psa_status_t psa_cipher_finish(psa_cipher_operation_t *operation,
|
|||
};
|
||||
|
||||
if (operation->handle <= 0) {
|
||||
return (PSA_ERROR_INVALID_ARGUMENT);
|
||||
return (PSA_ERROR_BAD_STATE);
|
||||
}
|
||||
|
||||
err_call = psa_call(operation->handle, &in_vec, 1, out_vec, 2);
|
||||
|
|
Loading…
Reference in New Issue