mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-04 22:19:05 +00:00
Checking in critical places if the mbedtls_platform_zeroize() was successful
Signed-off-by: Piotr Nowicki <piotr.nowicki@arm.com>
This commit is contained in:
parent
ed840dbcd8
commit
a6348edc23
2 changed files with 11 additions and 5 deletions
|
|
@ -186,7 +186,9 @@ int uECC_shared_secret(const uint8_t *public_key, const uint8_t *private_key,
|
|||
uECC_vli_nativeToBytes(secret, num_bytes, _public);
|
||||
|
||||
/* erasing temporary buffer used to store secret: */
|
||||
mbedtls_platform_zeroize(_private, sizeof(_private));
|
||||
if (_private == mbedtls_platform_zeroize(_private, sizeof(_private))) {
|
||||
return r;
|
||||
}
|
||||
|
||||
return r;
|
||||
return UECC_FAULT_DETECTED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue