]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix BN_DEBUG: ossl_assert() → assert()
authorRichard Levitte <levitte@openssl.org>
Thu, 9 Oct 2025 17:55:47 +0000 (19:55 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 4 Nov 2025 09:21:29 +0000 (10:21 +0100)
commita06897df7788a5163f1c39b3759e64cd9b62225c
tree5fac7d4223f24199e4e66f3ddaec9ab5dafd78c9
parentc8b4a397d066857492c714735d7658cd1e545e81
Fix BN_DEBUG: ossl_assert() → assert()

ossl_assert() has been modified so much that it no longer fits the
purpose of bn_check_top() when BN_DEBUG is defined in a debug build,
which is to abort and tell where the BIGNUM is inconsistent.  This
is by design.

This has remained undiscovered because no one has tried BN_DEBUG
for quite a while.

Assertions in bn_check_top() are also rearranged to better show what
the actual problem is.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28801)
crypto/bn/bn_local.h