if (!tls_group_allowed(s, pgroups[i], SSL_SECOP_CURVE_SUPPORTED))
continue;
+ if (!tls_valid_group(s, pgroups[i], TLS1_3_VERSION, TLS1_3_VERSION,
+ 0, NULL))
+ continue;
+
curve_id = pgroups[i];
break;
}
break;
}
if (i >= num_groups
- || !tls_group_allowed(s, group_id, SSL_SECOP_CURVE_SUPPORTED)) {
+ || !tls_group_allowed(s, group_id, SSL_SECOP_CURVE_SUPPORTED)
+ || !tls_valid_group(s, group_id, TLS1_3_VERSION, TLS1_3_VERSION,
+ 0, NULL)) {
SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_KEY_SHARE);
return 0;
}
}
/* Check if this share is for a group we can use */
- if (!check_in_list(s, group_id, srvrgroups, srvr_num_groups, 1)) {
+ if (!check_in_list(s, group_id, srvrgroups, srvr_num_groups, 1)
+ || !tls_group_allowed(s, group_id, SSL_SECOP_CURVE_SUPPORTED)
+ /*
+ * We tolerate but ignore a group id that we don't think is
+ * suitable for TLSv1.3
+ */
+ || !tls_valid_group(s, group_id, TLS1_3_VERSION, TLS1_3_VERSION,
+ 0, NULL)) {
/* Share not suitable */
continue;
}