Move ssl_dtls_replay_reset() to public namespace

This commit is contained in:
Hanno Becker 2020-02-05 10:45:48 +00:00
parent 43aefe2321
commit 7e8e6a6870
2 changed files with 7 additions and 7 deletions

View file

@ -1086,4 +1086,8 @@ void mbedtls_ssl_update_in_pointers( mbedtls_ssl_context *ssl );
int mbedtls_ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial );
#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY)
void mbedtls_ssl_dtls_replay_reset( mbedtls_ssl_context *ssl );
#endif
#endif /* ssl_internal.h */

View file

@ -3936,10 +3936,6 @@ static void ssl_flight_free( mbedtls_ssl_flight_item *flight )
}
}
#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY)
static void ssl_dtls_replay_reset( mbedtls_ssl_context *ssl );
#endif
/*
* Swap transform_out and out_ctr with the alternative ones
*/
@ -4847,7 +4843,7 @@ void mbedtls_ssl_update_handshake_status( mbedtls_ssl_context *ssl )
* not seen yet).
*/
#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY)
static void ssl_dtls_replay_reset( mbedtls_ssl_context *ssl )
void mbedtls_ssl_dtls_replay_reset( mbedtls_ssl_context *ssl )
{
ssl->in_window_top = 0;
ssl->in_window = 0;
@ -7537,7 +7533,7 @@ int mbedtls_ssl_parse_change_cipher_spec( mbedtls_ssl_context *ssl )
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
{
#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY)
ssl_dtls_replay_reset( ssl );
mbedtls_ssl_dtls_replay_reset( ssl );
#endif
/* Increment epoch */
@ -8695,7 +8691,7 @@ int mbedtls_ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial )
ssl->in_epoch = 0;
#endif
#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY)
ssl_dtls_replay_reset( ssl );
mbedtls_ssl_dtls_replay_reset( ssl );
#endif
ssl->in_hslen = 0;