mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-29 12:32:48 +00:00
Remove useless braces in ECHDE-PSK part of ssl_write_client_key_exchange()
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
2540045542
commit
b9f319aec1
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user