diff --git a/library/pk.c b/library/pk.c index d46a93461a..dcdfd1a5fc 100644 --- a/library/pk.c +++ b/library/pk.c @@ -672,6 +672,8 @@ int mbedtls_pk_wrap_as_opaque(mbedtls_pk_context *pk, return MBEDTLS_ERR_PK_HW_ACCEL_FAILED; } + mbedtls_platform_zeroize(d, sizeof(d)); + /* make PK context wrap the key slot */ mbedtls_pk_free(pk); mbedtls_pk_init(pk);