If the client sends us a group in a key_share that is in our
supported_groups list but is otherwise not suitable (e.g. not compatible
with TLSv1.3) we reject it. We should not ask for that same group again
in a subsequent HRR.
Fixes #21157
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/21163)
group_id = pgroups[i];
if (check_in_list(s, group_id, clntgroups, clnt_num_groups,
- 1))
+ 1)
+ && tls_group_allowed(s, group_id,
+ SSL_SECOP_CURVE_SUPPORTED)
+ && tls_valid_group(s, group_id, TLS1_3_VERSION,
+ TLS1_3_VERSION, 0, NULL))
break;
}