1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Move ssl_check_timer() to public namespace

This commit is contained in:
Hanno Becker
2020-02-05 10:39:31 +00:00
parent dd77229184
commit 7876d127a9
2 changed files with 5 additions and 3 deletions

View File

@ -80,7 +80,7 @@ void mbedtls_ssl_set_timer( mbedtls_ssl_context *ssl, uint32_t millisecs )
/*
* Return -1 is timer is expired, 0 if it isn't.
*/
static int ssl_check_timer( mbedtls_ssl_context *ssl )
int mbedtls_ssl_check_timer( mbedtls_ssl_context *ssl )
{
if( ssl->f_get_timer == NULL )
return( 0 );
@ -3684,7 +3684,7 @@ int mbedtls_ssl_fetch_input( mbedtls_ssl_context *ssl, size_t nb_want )
* This avoids by-passing the timer when repeatedly receiving messages
* that will end up being dropped.
*/
if( ssl_check_timer( ssl ) != 0 )
if( mbedtls_ssl_check_timer( ssl ) != 0 )
{
MBEDTLS_SSL_DEBUG_MSG( 2, ( "timer has expired" ) );
ret = MBEDTLS_ERR_SSL_TIMEOUT;
@ -3763,7 +3763,7 @@ int mbedtls_ssl_fetch_input( mbedtls_ssl_context *ssl, size_t nb_want )
{
len = nb_want - ssl->in_left;
if( ssl_check_timer( ssl ) != 0 )
if( mbedtls_ssl_check_timer( ssl ) != 0 )
ret = MBEDTLS_ERR_SSL_TIMEOUT;
else
{