diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index 19d4b4631efefca666cad9eb64938c328f872329..0cde2e750a59915b0d88912ba08973f4902eca95 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -1933,12 +1933,11 @@ int check_in_list(SSL *s, unsigned int group_id, const unsigned char *groups, if (group_id == share_id && (!checkallow || tls_curve_allowed(s, groups, SSL_SECOP_CURVE_CHECK))) { - break; + return 1; } } - /* If i == num_groups then not in the list */ - return i < num_groups; + return 0; } #endif