diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index 0477e916a..9703fcb16 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -651,7 +651,7 @@ typedef enum MBEDTLS_SSL_FLUSH_BUFFERS, MBEDTLS_SSL_HANDSHAKE_WRAPUP, MBEDTLS_SSL_HANDSHAKE_OVER, - MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET, + MBEDTLS_SSL_NEW_SESSION_TICKET, MBEDTLS_SSL_SERVER_HELLO_VERIFY_REQUEST_SENT, MBEDTLS_SSL_HELLO_RETRY_REQUEST, MBEDTLS_SSL_ENCRYPTED_EXTENSIONS, @@ -660,7 +660,6 @@ typedef enum MBEDTLS_SSL_CLIENT_CCS_BEFORE_2ND_CLIENT_HELLO, MBEDTLS_SSL_SERVER_CCS_AFTER_SERVER_HELLO, MBEDTLS_SSL_SERVER_CCS_AFTER_HELLO_RETRY_REQUEST, - MBEDTLS_SSL_CLIENT_NEW_SESSION_TICKET, } mbedtls_ssl_states; diff --git a/library/ssl_msg.c b/library/ssl_msg.c index 4d7306813..9c207948d 100644 --- a/library/ssl_msg.c +++ b/library/ssl_msg.c @@ -5304,7 +5304,7 @@ static int ssl_tls13_check_new_session_ticket( mbedtls_ssl_context *ssl ) MBEDTLS_SSL_DEBUG_MSG( 3, ( "NewSessionTicket received" ) ); mbedtls_ssl_handshake_set_state( ssl, - MBEDTLS_SSL_CLIENT_NEW_SESSION_TICKET ); + MBEDTLS_SSL_NEW_SESSION_TICKET ); return( MBEDTLS_ERR_SSL_WANT_READ ); } diff --git a/library/ssl_tls12_client.c b/library/ssl_tls12_client.c index 7fa6443a0..240520854 100644 --- a/library/ssl_tls12_client.c +++ b/library/ssl_tls12_client.c @@ -3627,7 +3627,7 @@ int mbedtls_ssl_handshake_client_step( mbedtls_ssl_context *ssl ) if( ssl->state == MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC && ssl->handshake->new_session_ticket != 0 ) { - ssl->state = MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET; + ssl->state = MBEDTLS_SSL_NEW_SESSION_TICKET; } #endif @@ -3704,7 +3704,7 @@ int mbedtls_ssl_handshake_client_step( mbedtls_ssl_context *ssl ) * Finished */ #if defined(MBEDTLS_SSL_SESSION_TICKETS) - case MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET: + case MBEDTLS_SSL_NEW_SESSION_TICKET: ret = ssl_parse_new_session_ticket( ssl ); break; #endif diff --git a/library/ssl_tls13_client.c b/library/ssl_tls13_client.c index 5e368a10e..42653a310 100644 --- a/library/ssl_tls13_client.c +++ b/library/ssl_tls13_client.c @@ -2077,7 +2077,7 @@ static int ssl_tls13_postprocess_new_session_ticket( mbedtls_ssl_context *ssl ) } /* - * Handler for MBEDTLS_SSL_CLIENT_NEW_SESSION_TICKET + * Handler for MBEDTLS_SSL_NEW_SESSION_TICKET */ static int ssl_tls13_process_new_session_ticket( mbedtls_ssl_context *ssl ) { @@ -2185,7 +2185,7 @@ int mbedtls_ssl_tls13_handshake_client_step( mbedtls_ssl_context *ssl ) #endif /* MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE */ #if defined(MBEDTLS_SSL_SESSION_TICKETS) - case MBEDTLS_SSL_CLIENT_NEW_SESSION_TICKET: + case MBEDTLS_SSL_NEW_SESSION_TICKET: ret = ssl_tls13_process_new_session_ticket( ssl ); if( ret != 0 ) break; diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index a6c9708fc..942d70524 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -12609,7 +12609,7 @@ run_test "TLS 1.3: NewSessionTicket: Basic check, m->O" \ "$P_CLI debug_level=4" \ 0 \ -c "Protocol is TLSv1.3" \ - -c "MBEDTLS_SSL_CLIENT_NEW_SESSION_TICKET" \ + -c "MBEDTLS_SSL_NEW_SESSION_TICKET" \ -c "got new session ticket." \ -c "HTTP/1.0 200 ok" @@ -12623,7 +12623,7 @@ run_test "TLS 1.3: NewSessionTicket: Basic check, m->G" \ "$P_CLI debug_level=4" \ 0 \ -c "Protocol is TLSv1.3" \ - -c "MBEDTLS_SSL_CLIENT_NEW_SESSION_TICKET" \ + -c "MBEDTLS_SSL_NEW_SESSION_TICKET" \ -c "got new session ticket." \ -c "HTTP/1.0 200 OK" diff --git a/tests/suites/test_suite_ssl.data b/tests/suites/test_suite_ssl.data index 19a1ae6f0..34f4d66c4 100644 --- a/tests/suites/test_suite_ssl.data +++ b/tests/suites/test_suite_ssl.data @@ -223,7 +223,7 @@ move_handshake_to_state:MBEDTLS_SSL_IS_CLIENT:MBEDTLS_SSL_SERVER_HELLO_VERIFY_RE Negative test moving servers ssl to state: NEW_SESSION_TICKET depends_on:MBEDTLS_SSL_PROTO_TLS1_2 -move_handshake_to_state:MBEDTLS_SSL_IS_SERVER:MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET:0 +move_handshake_to_state:MBEDTLS_SSL_IS_SERVER:MBEDTLS_SSL_NEW_SESSION_TICKET:0 TLS 1.3:Test moving clients handshake to state: ENCRYPTED_EXTENSIONS depends_on:MBEDTLS_SSL_PROTO_TLS1_3:!MBEDTLS_SSL_PROTO_TLS1_2