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
1 changed files with 0 additions and 4 deletions
|
@ -3016,12 +3016,10 @@ ecdh_calc_secret:
|
||||||
* opaque psk_identity<0..2^16-1>;
|
* opaque psk_identity<0..2^16-1>;
|
||||||
*/
|
*/
|
||||||
if( mbedtls_ssl_conf_has_static_psk( ssl->conf ) == 0 )
|
if( mbedtls_ssl_conf_has_static_psk( ssl->conf ) == 0 )
|
||||||
{
|
|
||||||
/* We don't offer PSK suites if we don't have a PSK,
|
/* We don't offer PSK suites if we don't have a PSK,
|
||||||
* and we check that the server's choice is among the
|
* and we check that the server's choice is among the
|
||||||
* ciphersuites we offered, so this should never happen. */
|
* ciphersuites we offered, so this should never happen. */
|
||||||
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
||||||
}
|
|
||||||
|
|
||||||
/* Opaque PSKs are currently only supported for PSK-only suites. */
|
/* Opaque PSKs are currently only supported for PSK-only suites. */
|
||||||
if( ssl_conf_has_static_raw_psk( ssl->conf ) == 0 )
|
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 )
|
if( mbedtls_ssl_get_psk( ssl, &psk, &psk_len )
|
||||||
== MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED )
|
== MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED )
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
* This should never happen because the existence of a PSK is always
|
* This should never happen because the existence of a PSK is always
|
||||||
* checked before calling this function
|
* checked before calling this function
|
||||||
*/
|
*/
|
||||||
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
||||||
}
|
|
||||||
|
|
||||||
/* Write the PSK length as uint16 */
|
/* Write the PSK length as uint16 */
|
||||||
MBEDTLS_PUT_UINT16_BE( psk_len, p, 0 );
|
MBEDTLS_PUT_UINT16_BE( psk_len, p, 0 );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue