Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2623)
if (SSL_IS_TLS13(s)) {
/* For TLS 1.3 check curve matches signature algorithm */
- if (curve != lu->curve) {
+ if (lu->curve != NID_undef && curve != lu->curve) {
SSLerr(SSL_F_TLS12_CHECK_PEER_SIGALG, SSL_R_WRONG_CURVE);
return 0;
}
curve = EC_GROUP_get_curve_name(EC_KEY_get0_group(ec));
}
- if (curve != lu->curve)
+ if (lu->curve != NID_undef && curve != lu->curve)
continue;
#else
continue;