diff --git a/library/ssl_cli.c b/library/ssl_cli.c index cacab330a..e8cb0f143 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -723,6 +723,12 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl ) continue; #endif +#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) + if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE && + mbedtls_ecjpake_check( &ssl->handshake->ecjpake_ctx ) != 0 ) + continue; +#endif + MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, add ciphersuite: %2d", ciphersuites[i] ) );