Remove cache callbacks from config on client

The session cache is only server-side. This also aligns the conditions
guarding those fields with the condition guarding the function setting them -
no need to have the fields if we can't set them.

This preserves the API and ABI in the default config as it only affects
non-default configs.
This commit is contained in:
Manuel Pégourié-Gonnard 2019-07-01 11:14:18 +02:00
parent 594a1bbc4f
commit 33cb3e1c7e

View file

@ -906,13 +906,13 @@ struct mbedtls_ssl_config
int (*f_rng)(void *, unsigned char *, size_t);
void *p_rng; /*!< context for the RNG function */
#if !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
#if defined(MBEDTLS_SSL_SRV_C) && !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
/** Callback to retrieve a session from the cache */
int (*f_get_cache)(void *, mbedtls_ssl_session *);
/** Callback to store a session into the cache */
int (*f_set_cache)(void *, const mbedtls_ssl_session *);
void *p_cache; /*!< context for cache callbacks */
#endif /* !MBEDTLS_SSL_NO_SESSION_CACHE */
#endif /* MBEDTLS_SSL_SRV_C && !MBEDTLS_SSL_NO_SESSION_CACHE */
#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
/** Callback for setting cert according to SNI extension */