src/ssl.c: in wolfSSL_curve_is_disabled(), fix shiftTooManyBitsSigned.

This commit is contained in:
Daniel Pouzzner
2023-12-25 00:27:49 -06:00
parent 8a32e7f3f9
commit e68facd889

View File

@ -30338,9 +30338,9 @@ int wolfSSL_curve_is_disabled(const WOLFSSL* ssl, word16 curve_id)
} }
if (curve_id >= 32) { if (curve_id >= 32) {
/* 0 is for invalid and 1-14 aren't used otherwise. */ /* 0 is for invalid and 1-14 aren't used otherwise. */
return (ssl->disabledCurves & (1 << (curve_id - 32))) != 0; return (ssl->disabledCurves & (1U << (curve_id - 32))) != 0;
} }
return (ssl->disabledCurves & (1 << curve_id)) != 0; return (ssl->disabledCurves & (1U << curve_id)) != 0;
} }
#if (defined(HAVE_ECC) || \ #if (defined(HAVE_ECC) || \