diff --git a/configs/baremetal.h b/configs/baremetal.h index 43a488c2f..038b06026 100644 --- a/configs/baremetal.h +++ b/configs/baremetal.h @@ -165,7 +165,7 @@ #define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE #define MBEDTLS_DELAYED_SERVER_CERT_VERIFICATION #define MBEDTLS_SSL_FREE_SERVER_CERTIFICATE -#define MBEDTLS_IMMEDIATE_TRANSMISSION +#define MBEDTLS_SSL_IMMEDIATE_TRANSMISSION #define MBEDTLS_EARLY_KEY_COMPUTATION #if defined(MBEDTLS_USER_CONFIG_FILE) diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index 3c3c1ce56..0fca50a89 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -1616,13 +1616,13 @@ /** - * \def MBEDTLS_IMMEDIATE_TRANSMISSION + * \def MBEDTLS_SSL_IMMEDIATE_TRANSMISSION * * Force stack to immediately transmit messages. * * Requires: MBEDTLS_SSL_PROTO_DTLS */ -//#define MBEDTLS_IMMEDIATE_TRANSMISSION +//#define MBEDTLS_SSL_IMMEDIATE_TRANSMISSION /** * \def MBEDTLS_EARLY_KEY_COMPUTATION diff --git a/include/mbedtls/ssl_internal.h b/include/mbedtls/ssl_internal.h index 80da3ac1a..bd2169ef3 100644 --- a/include/mbedtls/ssl_internal.h +++ b/include/mbedtls/ssl_internal.h @@ -1203,7 +1203,7 @@ void mbedtls_ssl_send_flight_completed( mbedtls_ssl_context *ssl ); void mbedtls_ssl_recv_flight_completed( mbedtls_ssl_context *ssl ); int mbedtls_ssl_resend( mbedtls_ssl_context *ssl ); int mbedtls_ssl_flight_transmit( mbedtls_ssl_context *ssl ); -#if defined(MBEDTLS_IMMEDIATE_TRANSMISSION) +#if defined(MBEDTLS_SSL_IMMEDIATE_TRANSMISSION) void mbedtls_ssl_immediate_flight_done( mbedtls_ssl_context *ssl ); #endif #endif diff --git a/library/ssl_cli.c b/library/ssl_cli.c index eba30fa72..bde7d10ff 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -1143,7 +1143,7 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl ) #if defined(MBEDTLS_SSL_PROTO_DTLS) if( MBEDTLS_SSL_TRANSPORT_IS_DTLS( ssl->conf->transport ) ) { -#if defined(MBEDTLS_IMMEDIATE_TRANSMISSION) +#if defined(MBEDTLS_SSL_IMMEDIATE_TRANSMISSION) mbedtls_ssl_immediate_flight_done( ssl ); #else if( ( ret = mbedtls_ssl_flight_transmit( ssl ) ) != 0 ) diff --git a/library/ssl_srv.c b/library/ssl_srv.c index ce92f98dc..7ef263c49 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -2745,7 +2745,7 @@ static int ssl_write_hello_verify_request( mbedtls_ssl_context *ssl ) #if defined(MBEDTLS_SSL_PROTO_DTLS) if( MBEDTLS_SSL_TRANSPORT_IS_DTLS( ssl->conf->transport ) ) { -#if defined(MBEDTLS_IMMEDIATE_TRANSMISSION) +#if defined(MBEDTLS_SSL_IMMEDIATE_TRANSMISSION) mbedtls_ssl_immediate_flight_done( ssl ); #else if( ( ret = mbedtls_ssl_flight_transmit( ssl ) ) != 0 ) @@ -3810,7 +3810,7 @@ static int ssl_write_server_hello_done( mbedtls_ssl_context *ssl ) #if defined(MBEDTLS_SSL_PROTO_DTLS) if( MBEDTLS_SSL_TRANSPORT_IS_DTLS( ssl->conf->transport ) ) { -#if defined(MBEDTLS_IMMEDIATE_TRANSMISSION) +#if defined(MBEDTLS_SSL_IMMEDIATE_TRANSMISSION) mbedtls_ssl_immediate_flight_done( ssl ); #else if( ( ret = mbedtls_ssl_flight_transmit( ssl ) ) != 0 ) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index b1205a4dc..75ec82170 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -4527,7 +4527,7 @@ static int ssl_flight_append( mbedtls_ssl_context *ssl ) cur->next = msg; } -#if defined(MBEDTLS_IMMEDIATE_TRANSMISSION) +#if defined(MBEDTLS_SSL_IMMEDIATE_TRANSMISSION) ssl->handshake->cur_msg = msg; ssl->handshake->cur_msg_p = msg->p + 12; { @@ -4634,7 +4634,7 @@ int mbedtls_ssl_resend( mbedtls_ssl_context *ssl ) return( ret ); } -#if defined(MBEDTLS_IMMEDIATE_TRANSMISSION) +#if defined(MBEDTLS_SSL_IMMEDIATE_TRANSMISSION) void mbedtls_ssl_immediate_flight_done( mbedtls_ssl_context *ssl ) { MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> mbedtls_ssl_immediate_flight_done" ) ); @@ -8743,7 +8743,7 @@ int mbedtls_ssl_write_finished( mbedtls_ssl_context *ssl ) #if defined(MBEDTLS_SSL_PROTO_DTLS) if( MBEDTLS_SSL_TRANSPORT_IS_DTLS( ssl->conf->transport ) ) { -#if defined(MBEDTLS_IMMEDIATE_TRANSMISSION) +#if defined(MBEDTLS_SSL_IMMEDIATE_TRANSMISSION) mbedtls_ssl_immediate_flight_done( ssl ); #else if( ( ret = mbedtls_ssl_flight_transmit( ssl ) ) != 0 ) diff --git a/library/version_features.c b/library/version_features.c index 26bade403..11045f8bc 100644 --- a/library/version_features.c +++ b/library/version_features.c @@ -495,9 +495,9 @@ static const char *features[] = { #if defined(MBEDTLS_SSL_FREE_SERVER_CERTIFICATE) "MBEDTLS_SSL_FREE_SERVER_CERTIFICATE", #endif /* MBEDTLS_SSL_FREE_SERVER_CERTIFICATE */ -#if defined(MBEDTLS_IMMEDIATE_TRANSMISSION) - "MBEDTLS_IMMEDIATE_TRANSMISSION", -#endif /* MBEDTLS_IMMEDIATE_TRANSMISSION */ +#if defined(MBEDTLS_SSL_IMMEDIATE_TRANSMISSION) + "MBEDTLS_SSL_IMMEDIATE_TRANSMISSION", +#endif /* MBEDTLS_SSL_IMMEDIATE_TRANSMISSION */ #if defined(MBEDTLS_EARLY_KEY_COMPUTATION) "MBEDTLS_EARLY_KEY_COMPUTATION", #endif /* MBEDTLS_EARLY_KEY_COMPUTATION */ diff --git a/programs/ssl/query_config.c b/programs/ssl/query_config.c index baf513b33..6f4e67fb3 100644 --- a/programs/ssl/query_config.c +++ b/programs/ssl/query_config.c @@ -1362,13 +1362,13 @@ int query_config( const char *config ) } #endif /* MBEDTLS_SSL_FREE_SERVER_CERTIFICATE */ -#if defined(MBEDTLS_IMMEDIATE_TRANSMISSION) - if( strcmp( "MBEDTLS_IMMEDIATE_TRANSMISSION", config ) == 0 ) +#if defined(MBEDTLS_SSL_IMMEDIATE_TRANSMISSION) + if( strcmp( "MBEDTLS_SSL_IMMEDIATE_TRANSMISSION", config ) == 0 ) { - MACRO_EXPANSION_TO_STR( MBEDTLS_IMMEDIATE_TRANSMISSION ); + MACRO_EXPANSION_TO_STR( MBEDTLS_SSL_IMMEDIATE_TRANSMISSION ); return( 0 ); } -#endif /* MBEDTLS_IMMEDIATE_TRANSMISSION */ +#endif /* MBEDTLS_SSL_IMMEDIATE_TRANSMISSION */ #if defined(MBEDTLS_EARLY_KEY_COMPUTATION) if( strcmp( "MBEDTLS_EARLY_KEY_COMPUTATION", config ) == 0 ) diff --git a/scripts/config.pl b/scripts/config.pl index d9aef53db..1fc156cbd 100755 --- a/scripts/config.pl +++ b/scripts/config.pl @@ -64,7 +64,7 @@ # MBEDTLS_PLATFORM_FAULT_CALLBACKS # MBEDTLS_DELAYED_SERVER_CERT_VERIFICATION # MBEDTLS_SSL_FREE_SERVER_CERTIFICATE -# MBEDTLS_IMMEDIATE_TRANSMISSION +# MBEDTLS_SSL_IMMEDIATE_TRANSMISSION # MBEDTLS_EARLY_KEY_COMPUTATION # and any symbol beginning _ALT # @@ -156,7 +156,7 @@ MBEDTLS_AES_128_BIT_MASKED MBEDTLS_PLATFORM_FAULT_CALLBACKS MBEDTLS_DELAYED_SERVER_CERT_VERIFICATION MBEDTLS_SSL_FREE_SERVER_CERTIFICATE -MBEDTLS_IMMEDIATE_TRANSMISSION +MBEDTLS_SSL_IMMEDIATE_TRANSMISSION MBEDTLS_EARLY_KEY_COMPUTATION _ALT\s*$ ); diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index e452ca3cd..bcefb8e34 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -1368,7 +1368,7 @@ run_test "SHA-256 allowed by default in client certificate" \ 0 # Tests for datagram packing -requires_config_disabled MBEDTLS_IMMEDIATE_TRANSMISSION +requires_config_disabled MBEDTLS_SSL_IMMEDIATE_TRANSMISSION run_test "DTLS: multiple records in same datagram, client and server" \ "$P_SRV dtls=1 dgram_packing=1 debug_level=2" \ "$P_CLI dtls=1 dgram_packing=1 debug_level=2" \ @@ -1376,7 +1376,7 @@ run_test "DTLS: multiple records in same datagram, client and server" \ -c "next record in same datagram" \ -s "next record in same datagram" -requires_config_disabled MBEDTLS_IMMEDIATE_TRANSMISSION +requires_config_disabled MBEDTLS_SSL_IMMEDIATE_TRANSMISSION run_test "DTLS: multiple records in same datagram, client only" \ "$P_SRV dtls=1 dgram_packing=0 debug_level=2" \ "$P_CLI dtls=1 dgram_packing=1 debug_level=2" \ @@ -1384,7 +1384,7 @@ run_test "DTLS: multiple records in same datagram, client only" \ -s "next record in same datagram" \ -C "next record in same datagram" -requires_config_disabled MBEDTLS_IMMEDIATE_TRANSMISSION +requires_config_disabled MBEDTLS_SSL_IMMEDIATE_TRANSMISSION run_test "DTLS: multiple records in same datagram, server only" \ "$P_SRV dtls=1 dgram_packing=1 debug_level=2" \ "$P_CLI dtls=1 dgram_packing=0 debug_level=2" \