Add an "SSL" infix to MBEDTLS_IMMEDIATE_TRANSMISSION

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek 2020-12-21 07:56:57 -05:00
parent df6e684460
commit 4f5549f595
10 changed files with 22 additions and 22 deletions

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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 )

View File

@ -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 )

View File

@ -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 )

View File

@ -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 */

View File

@ -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 )

View File

@ -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*$
);

View File

@ -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" \