Remove peer CRT from cache if !MBEDTLS_SSL_KEEP_PEER_CERTIFICATE

This commit is contained in:
Hanno Becker 2019-02-06 15:57:49 +00:00
parent c966bd16be
commit a887d1a5b6
2 changed files with 14 additions and 9 deletions

View file

@ -70,7 +70,8 @@ struct mbedtls_ssl_cache_entry
mbedtls_time_t timestamp; /*!< entry timestamp */
#endif
mbedtls_ssl_session session; /*!< entry session */
#if defined(MBEDTLS_X509_CRT_PARSE_C)
#if defined(MBEDTLS_X509_CRT_PARSE_C) && \
defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
mbedtls_x509_buf peer_cert; /*!< entry peer_cert */
#endif
mbedtls_ssl_cache_entry *next; /*!< chain pointer */