Make BN_is_zero() check word values.
authorjsing <jsing@openbsd.org>
Tue, 14 Feb 2023 18:22:35 +0000 (18:22 +0000)
committerjsing <jsing@openbsd.org>
Tue, 14 Feb 2023 18:22:35 +0000 (18:22 +0000)
commit957e96d32200b8d7cb0a34732236b6b72342e064
tree6552f29802ebe8db6761277d14ff1a1f3f1ef1f0
parentae57c522841642bd680c4788b90ac931f9512451
Make BN_is_zero() check word values.

Rather than completely relying on top, check the words of a bignum.
This gets us one step away from being dependent on top and additionally
means that we correctly report zero even if top is not yet correct.

ok tb@
lib/libcrypto/bn/bn_lib.c