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
1 changed files with 1 additions and 1 deletions
|
@ -860,7 +860,7 @@ int mbedtls_pk_write_key_pem(const mbedtls_pk_context *key, unsigned char *buf,
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
mbedtls_free(output_buf);
|
mbedtls_zeroize_and_free(output_buf, PRV_DER_MAX_BYTES);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_PEM_WRITE_C */
|
#endif /* MBEDTLS_PEM_WRITE_C */
|
||||||
|
|
Loading…
Reference in a new issue