mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Refactor macro-spanning if in ssl_tls13_server.c
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
@ -680,11 +680,13 @@ static int ssl_tls13_write_server_pre_shared_key_ext( mbedtls_ssl_context *ssl,
|
|||||||
|
|
||||||
*olen = 0;
|
*olen = 0;
|
||||||
|
|
||||||
|
int not_using_psk = 0;
|
||||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||||
if( mbedtls_svc_key_id_is_null( ssl->handshake->psk_opaque ) )
|
not_using_psk = ( mbedtls_svc_key_id_is_null( ssl->handshake->psk_opaque ) );
|
||||||
#else
|
#else
|
||||||
if( ssl->handshake->psk == NULL )
|
not_using_psk = ( ssl->handshake->psk == NULL );
|
||||||
#endif
|
#endif
|
||||||
|
if( not_using_psk )
|
||||||
{
|
{
|
||||||
/* We shouldn't have called this extension writer unless we've
|
/* We shouldn't have called this extension writer unless we've
|
||||||
* chosen to use a PSK. */
|
* chosen to use a PSK. */
|
||||||
|
Reference in New Issue
Block a user