pk: fix: clear buffer holding raw EC private key on exit
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
c8b7865612
commit
2c50526476
1 changed files with 2 additions and 0 deletions
|
@ -908,6 +908,8 @@ int mbedtls_pk_wrap_as_opaque(mbedtls_pk_context *pk,
|
|||
return PSA_PK_TO_MBEDTLS_ERR(status);
|
||||
}
|
||||
|
||||
mbedtls_platform_zeroize(d, sizeof(d));
|
||||
|
||||
/* make PK context wrap the key slot */
|
||||
mbedtls_pk_free(pk);
|
||||
mbedtls_pk_init(pk);
|
||||
|
|
Loading…
Reference in a new issue