mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-29 04:20:12 +00:00
ssl_cache: Add getter access to timeout field
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
This commit is contained in:
parent
7dbd2bf90c
commit
af724dd112
@ -160,6 +160,20 @@ int mbedtls_ssl_cache_remove(void *data,
|
|||||||
* \param timeout cache entry timeout in seconds
|
* \param timeout cache entry timeout in seconds
|
||||||
*/
|
*/
|
||||||
void mbedtls_ssl_cache_set_timeout(mbedtls_ssl_cache_context *cache, int timeout);
|
void mbedtls_ssl_cache_set_timeout(mbedtls_ssl_cache_context *cache, int timeout);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the cache timeout
|
||||||
|
*
|
||||||
|
* A timeout of 0 indicates no timeout.
|
||||||
|
*
|
||||||
|
* \param cache SSL cache context
|
||||||
|
*
|
||||||
|
* \return cache entry timeout in seconds
|
||||||
|
*/
|
||||||
|
static inline int mbedtls_ssl_cache_get_timeout(mbedtls_ssl_cache_context *cache)
|
||||||
|
{
|
||||||
|
return cache->MBEDTLS_PRIVATE(timeout);
|
||||||
|
}
|
||||||
#endif /* MBEDTLS_HAVE_TIME */
|
#endif /* MBEDTLS_HAVE_TIME */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user