mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-01-06 11:41:12 +03:00
Fix get_num_ops internal code.
Previously calling get_num_ops more than once would have ended up with ops getting double counted, and not calling inbetween completes would have ended up with ops getting missed. Fix this by moving this to where the work is actually done, and add tests for double calls to get_num_ops(). Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
@@ -656,7 +656,7 @@ uint32_t mbedtls_psa_interruptible_get_max_ops(void);
|
||||
* mbedtls_psa_sign_hash_complete().
|
||||
*/
|
||||
uint32_t mbedtls_psa_sign_hash_get_num_ops(
|
||||
mbedtls_psa_sign_hash_interruptible_operation_t *operation);
|
||||
const mbedtls_psa_sign_hash_interruptible_operation_t *operation);
|
||||
|
||||
/**
|
||||
* \brief Get the number of ops that a hash verification operation has taken for
|
||||
@@ -677,7 +677,7 @@ uint32_t mbedtls_psa_sign_hash_get_num_ops(
|
||||
* mbedtls_psa_verify_hash_complete().
|
||||
*/
|
||||
uint32_t mbedtls_psa_verify_hash_get_num_ops(
|
||||
mbedtls_psa_verify_hash_interruptible_operation_t *operation);
|
||||
const mbedtls_psa_verify_hash_interruptible_operation_t *operation);
|
||||
|
||||
/**
|
||||
* \brief Start signing a hash or short message with a private key, in an
|
||||
|
||||
Reference in New Issue
Block a user