diff --git a/src/tls.c b/src/tls.c index c3a6bc36d..f6cb27220 100644 --- a/src/tls.c +++ b/src/tls.c @@ -4268,6 +4268,10 @@ int TLSX_ValidateSupportedCurves(WOLFSSL* ssl, byte first, byte second) { curve = curve->next) { #ifdef OPENSSL_EXTRA + /* skip if name is not in supported ECC range */ + if (curve->name > WOLFSSL_ECC_X25519) + continue; + /* skip if curve is disabled by user */ if (ssl->ctx->disabledCurves & (1 << curve->name)) continue; #endif