mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
pkwrite: zeroize buf containing info of private key
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
@ -641,6 +641,7 @@ int mbedtls_pk_write_key_pem(mbedtls_pk_context *key, unsigned char *buf, size_t
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
mbedtls_platform_zeroize(output_buf, PRV_DER_MAX_BYTES);
|
||||
mbedtls_free(output_buf);
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user