From fa1e04a7c4cfcd9f31b70096487b3fe7d2079a29 Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Mon, 17 Oct 2022 09:04:59 +0200 Subject: [PATCH] tls13: keys: Fix PSK build only case When deriving the handshake stage master secret, in the case of a PSK only build, the only possible key exchange mode is PSK and there is no ephemeral key exchange shared secret in that case. Thus do not error out in that case in the first phae of the derivation dedicated to the shared secret. Signed-off-by: Ronald Cron --- library/ssl_tls13_keys.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/library/ssl_tls13_keys.c b/library/ssl_tls13_keys.c index 897541bb12..2209dd145c 100644 --- a/library/ssl_tls13_keys.c +++ b/library/ssl_tls13_keys.c @@ -1310,8 +1310,6 @@ int mbedtls_ssl_tls13_key_schedule_stage_handshake( mbedtls_ssl_context *ssl ) return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); } } -#else - return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); #endif /* MBEDTLS_KEY_EXCHANGE_SOME_ECDHE_ENABLED */ /*