mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-05 09:40:32 +00:00
pkwrite: zeroize buf containing info of private key
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
parent
edbab91bf8
commit
044eb16379
@ -860,7 +860,7 @@ int mbedtls_pk_write_key_pem(const mbedtls_pk_context *key, unsigned char *buf,
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
mbedtls_free(output_buf);
|
||||
mbedtls_zeroize_and_free(output_buf, PRV_DER_MAX_BYTES);
|
||||
return ret;
|
||||
}
|
||||
#endif /* MBEDTLS_PEM_WRITE_C */
|
||||
|
Loading…
x
Reference in New Issue
Block a user