fix various code format issues

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu 2022-07-15 15:01:08 +08:00
parent 032b15ce5e
commit 997549353e

View file

@ -395,17 +395,12 @@ static int ssl_tls13_write_selected_identity_ext( mbedtls_ssl_context *ssl,
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, adding pre_shared_key extension" ) );
MBEDTLS_SSL_CHK_BUF_PTR( p, end, 6 );
/* Extension Type */
MBEDTLS_PUT_UINT16_BE( MBEDTLS_TLS_EXT_PRE_SHARED_KEY, p, 0 );
/* Extension Length */
MBEDTLS_PUT_UINT16_BE( 2, p, 2 );
/* NOTE: This will need to be adjusted once we support multiple PSKs
* being offered by the client. */
selected_identity = 0;
/* Write selected_identity */
MBEDTLS_PUT_UINT16_BE( selected_identity, p, 4 );
*olen = 6;
@ -1702,7 +1697,8 @@ static int ssl_tls13_write_server_hello_body( mbedtls_ssl_context *ssl,
}
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
MBEDTLS_SSL_DEBUG_MSG( 2,( " mbedtls_ssl_tls13_some_psk_enabled %d", mbedtls_ssl_tls13_some_psk_enabled( ssl ) ) );
MBEDTLS_SSL_DEBUG_MSG( 2, ( " mbedtls_ssl_tls13_some_psk_enabled %d",
mbedtls_ssl_tls13_some_psk_enabled( ssl ) ) );
if( mbedtls_ssl_tls13_some_psk_enabled( ssl ) )
{
ret = ssl_tls13_write_selected_identity_ext( ssl, p, end, &output_len );