1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Fix issues with get_{sign/verify}_num_ops

Move to accumulate ops in context rather than attempting to read straight out
of structures due to structure ops getting reset per operation, and also
issues with _abort clearing internal data. Fix usage of size_t in structures

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
Paul Elliott
2022-12-15 17:00:30 +00:00
parent 588f8ed498
commit 296ede99c9
3 changed files with 25 additions and 4 deletions

View File

@@ -508,7 +508,7 @@ struct psa_sign_hash_interruptible_operation_s {
psa_driver_sign_hash_interruptible_context_t MBEDTLS_PRIVATE(ctx);
size_t MBEDTLS_PRIVATE(num_ops);
uint32_t MBEDTLS_PRIVATE(num_ops);
};
#define PSA_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT { 0, { 0 }, 0 }
@@ -539,7 +539,7 @@ struct psa_verify_hash_interruptible_operation_s {
psa_driver_verify_hash_interruptible_context_t MBEDTLS_PRIVATE(ctx);
size_t MBEDTLS_PRIVATE(num_ops);
uint32_t MBEDTLS_PRIVATE(num_ops);
};
#define PSA_VERIFY_HASH_INTERRUPTIBLE_OPERATION_INIT { 0, { 0 }, 0 }