Adapt session ticket implementation to removal of peer_cert field

This commit is contained in:
Hanno Becker 2019-02-07 12:26:46 +00:00
parent abe6f66c00
commit 94cc26dfa6

View File

@ -292,8 +292,9 @@ static int ssl_load_session( mbedtls_ssl_session *session,
/* Non-NULL pointer fields of `session` are meaningless
* and potentially harmful. Zeroize them for safety. */
#if defined(MBEDTLS_X509_CRT_PARSE_C)
#if defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
session->peer_cert = NULL;
#if !defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
#else
session->peer_cert_digest = NULL;
#endif /* !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE */
#endif /* MBEDTLS_X509_CRT_PARSE_C */