From b9f319aec1bc8ef24ecbcaeac96f531d37daf8f6 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Wed, 23 Mar 2022 17:44:29 +0100 Subject: [PATCH] Remove useless braces in ECHDE-PSK part of ssl_write_client_key_exchange() Signed-off-by: Neil Armstrong --- library/ssl_tls12_client.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/library/ssl_tls12_client.c b/library/ssl_tls12_client.c index 2e94505e6..ca09c3ee1 100644 --- a/library/ssl_tls12_client.c +++ b/library/ssl_tls12_client.c @@ -3016,12 +3016,10 @@ ecdh_calc_secret: * opaque psk_identity<0..2^16-1>; */ if( mbedtls_ssl_conf_has_static_psk( ssl->conf ) == 0 ) - { /* We don't offer PSK suites if we don't have a PSK, * and we check that the server's choice is among the * ciphersuites we offered, so this should never happen. */ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } /* Opaque PSKs are currently only supported for PSK-only suites. */ if( ssl_conf_has_static_raw_psk( ssl->conf ) == 0 ) @@ -3129,13 +3127,11 @@ ecdh_calc_secret: if( mbedtls_ssl_get_psk( ssl, &psk, &psk_len ) == MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED ) - { /* * This should never happen because the existence of a PSK is always * checked before calling this function */ return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); - } /* Write the PSK length as uint16 */ MBEDTLS_PUT_UINT16_BE( psk_len, p, 0 );