1
0
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:
Yanray Wang
2023-08-28 10:35:39 +08:00
parent c9d5ea9a9c
commit 4b0b97e18b

View File

@ -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;
}