Add the mbedtls prefix to ssl_check_dtls_clihlo_cookie
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
parent
e6487ab490
commit
078e9bcda6
3 changed files with 11 additions and 12 deletions
|
@ -2297,7 +2297,7 @@ int mbedtls_ssl_write_sig_alg_ext( mbedtls_ssl_context *ssl, unsigned char *buf,
|
||||||
const unsigned char *end, size_t *out_len );
|
const unsigned char *end, size_t *out_len );
|
||||||
|
|
||||||
#if defined(MBEDTLS_TEST_HOOKS)
|
#if defined(MBEDTLS_TEST_HOOKS)
|
||||||
int ssl_check_dtls_clihlo_cookie(
|
int mbedtls_ssl_check_dtls_clihlo_cookie(
|
||||||
mbedtls_ssl_context *ssl,
|
mbedtls_ssl_context *ssl,
|
||||||
const unsigned char *cli_id, size_t cli_id_len,
|
const unsigned char *cli_id, size_t cli_id_len,
|
||||||
const unsigned char *in, size_t in_len,
|
const unsigned char *in, size_t in_len,
|
||||||
|
|
|
@ -3149,10 +3149,8 @@ void mbedtls_ssl_dtls_replay_update( mbedtls_ssl_context *ssl )
|
||||||
* return MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED
|
* return MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED
|
||||||
* - otherwise return a specific error code
|
* - otherwise return a specific error code
|
||||||
*/
|
*/
|
||||||
#if !defined(MBEDTLS_TEST_HOOKS)
|
MBEDTLS_STATIC_TESTABLE
|
||||||
static
|
int mbedtls_ssl_check_dtls_clihlo_cookie(
|
||||||
#endif
|
|
||||||
int ssl_check_dtls_clihlo_cookie(
|
|
||||||
mbedtls_ssl_context *ssl,
|
mbedtls_ssl_context *ssl,
|
||||||
const unsigned char *cli_id, size_t cli_id_len,
|
const unsigned char *cli_id, size_t cli_id_len,
|
||||||
const unsigned char *in, size_t in_len,
|
const unsigned char *in, size_t in_len,
|
||||||
|
@ -3324,13 +3322,13 @@ static int ssl_handle_possible_reconnect( mbedtls_ssl_context *ssl )
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ssl_check_dtls_clihlo_cookie(
|
ret = mbedtls_ssl_check_dtls_clihlo_cookie(
|
||||||
ssl,
|
ssl,
|
||||||
ssl->cli_id, ssl->cli_id_len,
|
ssl->cli_id, ssl->cli_id_len,
|
||||||
ssl->in_buf, ssl->in_left,
|
ssl->in_buf, ssl->in_left,
|
||||||
ssl->out_buf, MBEDTLS_SSL_OUT_CONTENT_LEN, &len );
|
ssl->out_buf, MBEDTLS_SSL_OUT_CONTENT_LEN, &len );
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_RET( 2, "ssl_check_dtls_clihlo_cookie", ret );
|
MBEDTLS_SSL_DEBUG_RET( 2, "mbedtls_ssl_check_dtls_clihlo_cookie", ret );
|
||||||
|
|
||||||
if( ret == MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED )
|
if( ret == MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED )
|
||||||
{
|
{
|
||||||
|
|
|
@ -5521,7 +5521,8 @@ void cookie_parsing( data_t *cookie, int exp_ret )
|
||||||
0 );
|
0 );
|
||||||
|
|
||||||
TEST_EQUAL( mbedtls_ssl_setup( &ssl, &conf ), 0 );
|
TEST_EQUAL( mbedtls_ssl_setup( &ssl, &conf ), 0 );
|
||||||
TEST_EQUAL( ssl_check_dtls_clihlo_cookie( &ssl, ssl.cli_id, ssl.cli_id_len,
|
TEST_EQUAL( mbedtls_ssl_check_dtls_clihlo_cookie( &ssl, ssl.cli_id,
|
||||||
|
ssl.cli_id_len,
|
||||||
cookie->x, cookie->len,
|
cookie->x, cookie->len,
|
||||||
ssl.out_buf,
|
ssl.out_buf,
|
||||||
MBEDTLS_SSL_OUT_CONTENT_LEN,
|
MBEDTLS_SSL_OUT_CONTENT_LEN,
|
||||||
|
|
Loading…
Reference in a new issue