mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-24 17:41:01 +03:00
Fix {sign|verify}_get_num_ops
Move the obfuscation of the internal library only returning a delta of ops done into the driver wrapper, thus meaning driver wrapper and API call both return absolute values of work done. Document the differences at the internal implementation level. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
@@ -3286,7 +3286,7 @@ psa_status_t psa_sign_hash_complete(
|
||||
exit:
|
||||
|
||||
/* Update ops count with work done. */
|
||||
operation->num_ops += psa_driver_wrapper_sign_hash_get_num_ops(operation);
|
||||
operation->num_ops = psa_driver_wrapper_sign_hash_get_num_ops(operation);
|
||||
|
||||
if (status != PSA_OPERATION_INCOMPLETE) {
|
||||
psa_wipe_output_buffer(signature, status, signature_size,
|
||||
@@ -3413,7 +3413,7 @@ psa_status_t psa_verify_hash_complete(
|
||||
exit:
|
||||
|
||||
/* Update ops count with work done. */
|
||||
operation->num_ops += psa_driver_wrapper_verify_hash_get_num_ops(
|
||||
operation->num_ops = psa_driver_wrapper_verify_hash_get_num_ops(
|
||||
operation);
|
||||
|
||||
if (status != PSA_OPERATION_INCOMPLETE) {
|
||||
|
||||
Reference in New Issue
Block a user