Make mbedtls_ssl_read_record_layer() static

This function was previously global because it was
used directly within ssl_parse_certificate_verify()
in library/ssl_srv.c. The previous commit removed
this dependency, replacing the call by a call to
the global parent function mbedtls_ssl_read_record().
This renders mbedtls_ssl_read_record_layer() internal
and therefore allows to make it static, and accordingly
rename it as ssl_read_record_layer().
This commit is contained in:
Hanno Becker 2018-08-15 14:05:04 +01:00
parent a4b143a57c
commit 4162b11eb4
2 changed files with 4 additions and 3 deletions

View file

@ -479,7 +479,6 @@ int mbedtls_ssl_send_fatal_handshake_failure( mbedtls_ssl_context *ssl );
void mbedtls_ssl_reset_checksum( mbedtls_ssl_context *ssl );
int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl );
int mbedtls_ssl_read_record_layer( mbedtls_ssl_context *ssl );
int mbedtls_ssl_handle_message_type( mbedtls_ssl_context *ssl );
int mbedtls_ssl_prepare_handshake_record( mbedtls_ssl_context *ssl );
void mbedtls_ssl_update_handshake_status( mbedtls_ssl_context *ssl );

View file

@ -4283,6 +4283,8 @@ static void ssl_handshake_wrapup_free_hs_transform( mbedtls_ssl_context *ssl );
* RFC 6347 4.1.2.7) and continue reading until a valid record is found.
*
*/
static int ssl_read_record_layer( mbedtls_ssl_context *ssl );
int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl,
unsigned update_digest )
{
@ -4294,7 +4296,7 @@ int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl,
{
do {
ret = mbedtls_ssl_read_record_layer( ssl );
ret = ssl_read_record_layer( ssl );
if( ret == MBEDTLS_ERR_SSL_CONTINUE_PROCESSING )
continue;
@ -4332,7 +4334,7 @@ int mbedtls_ssl_read_record( mbedtls_ssl_context *ssl,
return( 0 );
}
int mbedtls_ssl_read_record_layer( mbedtls_ssl_context *ssl )
static int ssl_read_record_layer( mbedtls_ssl_context *ssl )
{
int ret;