diff --git a/include/mbedtls/ssl_internal.h b/include/mbedtls/ssl_internal.h index 9cf80efb47..a5c4ca1228 100644 --- a/include/mbedtls/ssl_internal.h +++ b/include/mbedtls/ssl_internal.h @@ -1817,6 +1817,6 @@ MBEDTLS_ALWAYS_INLINE static inline void mbedtls_ssl_pend_fatal_alert( ssl->pending_fatal_alert_msg = message; } -#define SSL_PROC_CHK(f) do { if( ( ret = f ) < 0 ) goto cleanup; } while( 0 ) +#define MBEDTLS_SSL_CHK(f) do { if( ( ret = f ) < 0 ) goto cleanup; } while( 0 ) #endif /* ssl_internal.h */ diff --git a/library/ssl_cli.c b/library/ssl_cli.c index c36a735078..e672af1299 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -2644,11 +2644,11 @@ static int ssl_process_server_key_exchange( mbedtls_ssl_context *ssl ) * Consider: Why don't we do this as post-processing after * the server certificate has been read? */ - SSL_PROC_CHK( ssl_server_key_exchange_prepare( ssl ) ); + MBEDTLS_SSL_CHK( ssl_server_key_exchange_prepare( ssl ) ); /* Coordination: * Check if we expect a ServerKeyExchange */ - SSL_PROC_CHK( ssl_server_key_exchange_coordinate( ssl ) ); + MBEDTLS_SSL_CHK( ssl_server_key_exchange_coordinate( ssl ) ); if( ret == SSL_SRV_KEY_EXCHANGE_EXPECTED ) { @@ -2670,7 +2670,7 @@ static int ssl_process_server_key_exchange( mbedtls_ssl_context *ssl ) } else { - SSL_PROC_CHK( ssl_server_key_exchange_parse( ssl, ssl->in_msg, + MBEDTLS_SSL_CHK( ssl_server_key_exchange_parse( ssl, ssl->in_msg, ssl->in_hslen ) ); } } @@ -2680,7 +2680,7 @@ static int ssl_process_server_key_exchange( mbedtls_ssl_context *ssl ) } /* Update state */ - SSL_PROC_CHK( ssl_server_key_exchange_postprocess( ssl ) ); + MBEDTLS_SSL_CHK( ssl_server_key_exchange_postprocess( ssl ) ); cleanup: @@ -3356,10 +3356,10 @@ static int ssl_process_client_key_exchange( mbedtls_ssl_context *ssl ) } #endif - SSL_PROC_CHK( ssl_client_key_exchange_prepare( ssl ) ); + MBEDTLS_SSL_CHK( ssl_client_key_exchange_prepare( ssl ) ); /* Prepare CertificateVerify message in output buffer. */ - SSL_PROC_CHK( ssl_client_key_exchange_write( ssl, ssl->out_msg, + MBEDTLS_SSL_CHK( ssl_client_key_exchange_write( ssl, ssl->out_msg, MBEDTLS_SSL_MAX_CONTENT_LEN, &ssl->out_msglen ) ); @@ -3370,11 +3370,11 @@ static int ssl_process_client_key_exchange( mbedtls_ssl_context *ssl ) #if defined(MBEDTLS_SSL__ECP_RESTARTABLE) cli_key_exchange_postprocess: #endif - SSL_PROC_CHK( ssl_client_key_exchange_postprocess( ssl ) ); + MBEDTLS_SSL_CHK( ssl_client_key_exchange_postprocess( ssl ) ); /* Dispatch message */ - SSL_PROC_CHK( mbedtls_ssl_write_handshake_msg( ssl ) ); + MBEDTLS_SSL_CHK( mbedtls_ssl_write_handshake_msg( ssl ) ); /* NOTE: For the new messaging layer, the postprocessing step * might come after the dispatching step if the latter diff --git a/library/ssl_srv.c b/library/ssl_srv.c index a31eda438a..413dfc2d13 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -4088,11 +4088,11 @@ static int ssl_process_client_key_exchange( mbedtls_ssl_context *ssl ) goto cleanup; } - SSL_PROC_CHK( ssl_client_key_exchange_parse( ssl, ssl->in_msg, + MBEDTLS_SSL_CHK( ssl_client_key_exchange_parse( ssl, ssl->in_msg, ssl->in_hslen ) ); /* Update state */ - SSL_PROC_CHK( ssl_client_key_exchange_postprocess( ssl ) ); + MBEDTLS_SSL_CHK( ssl_client_key_exchange_postprocess( ssl ) ); cleanup: