mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-11 05:45:40 +00:00
Adapt ssl_clear_peer_cert() to removal of peer_cert
field
This commit is contained in:
parent
6d1986e6f5
commit
13c327d500
|
@ -5775,14 +5775,14 @@ static int ssl_check_peer_crt_unchanged( mbedtls_ssl_context *ssl,
|
||||||
|
|
||||||
static void ssl_clear_peer_cert( mbedtls_ssl_session *session )
|
static void ssl_clear_peer_cert( mbedtls_ssl_session *session )
|
||||||
{
|
{
|
||||||
|
#if defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
|
||||||
if( session->peer_cert != NULL )
|
if( session->peer_cert != NULL )
|
||||||
{
|
{
|
||||||
mbedtls_x509_crt_free( session->peer_cert );
|
mbedtls_x509_crt_free( session->peer_cert );
|
||||||
mbedtls_free( session->peer_cert );
|
mbedtls_free( session->peer_cert );
|
||||||
session->peer_cert = NULL;
|
session->peer_cert = NULL;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
#if !defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
|
|
||||||
if( session->peer_cert_digest != NULL )
|
if( session->peer_cert_digest != NULL )
|
||||||
{
|
{
|
||||||
/* Zeroization is not necessary. */
|
/* Zeroization is not necessary. */
|
||||||
|
@ -5791,7 +5791,7 @@ static void ssl_clear_peer_cert( mbedtls_ssl_session *session )
|
||||||
session->peer_cert_digest_type = MBEDTLS_MD_NONE;
|
session->peer_cert_digest_type = MBEDTLS_MD_NONE;
|
||||||
session->peer_cert_digest_len = 0;
|
session->peer_cert_digest_len = 0;
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_SSL_KEEP_PEER_CERTIFICATE */
|
#endif /* !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue