mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-24 15:02:55 +00:00
Always call get_num_ops
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
2bc38a6dfe
commit
fe43d12f60
@ -3448,6 +3448,7 @@ psa_status_t psa_sign_hash_complete(
|
|||||||
size_t *signature_length)
|
size_t *signature_length)
|
||||||
{
|
{
|
||||||
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||||
|
psa_status_t numops_status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||||
|
|
||||||
*signature_length = 0;
|
*signature_length = 0;
|
||||||
|
|
||||||
@ -3470,8 +3471,9 @@ psa_status_t psa_sign_hash_complete(
|
|||||||
signature_length);
|
signature_length);
|
||||||
|
|
||||||
/* Update ops count with work done. */
|
/* Update ops count with work done. */
|
||||||
|
numops_status = psa_driver_wrapper_sign_hash_get_num_ops(operation, &operation->num_ops);
|
||||||
if (status == PSA_SUCCESS) {
|
if (status == PSA_SUCCESS) {
|
||||||
status = psa_driver_wrapper_sign_hash_get_num_ops(operation, &operation->num_ops);
|
status = numops_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
@ -3592,6 +3594,7 @@ psa_status_t psa_verify_hash_complete(
|
|||||||
psa_verify_hash_interruptible_operation_t *operation)
|
psa_verify_hash_interruptible_operation_t *operation)
|
||||||
{
|
{
|
||||||
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||||
|
psa_status_t numops_status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||||
|
|
||||||
/* Check that start has been called first, and that operation has not
|
/* Check that start has been called first, and that operation has not
|
||||||
* previously errored. */
|
* previously errored. */
|
||||||
@ -3603,8 +3606,9 @@ psa_status_t psa_verify_hash_complete(
|
|||||||
status = psa_driver_wrapper_verify_hash_complete(operation);
|
status = psa_driver_wrapper_verify_hash_complete(operation);
|
||||||
|
|
||||||
/* Update ops count with work done. */
|
/* Update ops count with work done. */
|
||||||
|
numops_status = psa_driver_wrapper_verify_hash_get_num_ops(operation, &operation->num_ops);
|
||||||
if (status == PSA_SUCCESS) {
|
if (status == PSA_SUCCESS) {
|
||||||
status = psa_driver_wrapper_verify_hash_get_num_ops(operation, &operation->num_ops);
|
status = numops_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user