diff --git a/library/ssl_tls.c b/library/ssl_tls.c index aeea3e4d0a5c..49a74187462e 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -8667,11 +8667,7 @@ int mbedtls_ssl_check_cert_usage( const mbedtls_x509_crt* cert, if( cert_endpoint == MBEDTLS_SSL_IS_SERVER ) { /* Server part of the key exchange */ -#if defined(MBEDTLS_SSL_PROTO_TLS1_2_OR_EARLIER) - switch( ciphersuite->key_exchange ) -#else /* defined(MBEDTLS_SSL_PROTO_TLS1_2_OR_EARLIER) */ switch( key_exchange ) -#endif /* !defined(MBEDTLS_SSL_PROTO_TLS1_2_OR_EARLIER) */ { case MBEDTLS_KEY_EXCHANGE_RSA: case MBEDTLS_KEY_EXCHANGE_RSA_PSK: