mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 23:25:44 +01:00
Fix certificate management when freeing handshake
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
parent
38c7f2d32f
commit
e2134ed4b1
@ -12099,12 +12099,11 @@ void mbedtls_ssl_handshake_free( mbedtls_ssl_context *ssl )
|
|||||||
defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
|
defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
|
||||||
if( ssl->session_negotiate )
|
if( ssl->session_negotiate )
|
||||||
{
|
{
|
||||||
mbedtls_x509_crt_free( ssl->session_negotiate->peer_cert );
|
ssl_clear_peer_cert( ssl->session_negotiate );
|
||||||
}
|
}
|
||||||
if( ssl->session )
|
if( ssl->session )
|
||||||
{
|
{
|
||||||
mbedtls_free( ssl->session->peer_cert );
|
ssl_clear_peer_cert( ssl->session );
|
||||||
ssl->session->peer_cert = NULL;
|
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_SSL_FREE_SERVER_CERTIFICATE */
|
#endif /* MBEDTLS_SSL_FREE_SERVER_CERTIFICATE */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user