Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.
authorjsing <jsing@openbsd.org>
Thu, 24 Nov 2022 01:30:01 +0000 (01:30 +0000)
committerjsing <jsing@openbsd.org>
Thu, 24 Nov 2022 01:30:01 +0000 (01:30 +0000)
commite729bd5a467a6c48d0a84ceb93aee7ed2c1bc92f
tree20e9e93661476e407894b71bfbb572bd52e29a9a
parentd357b2803b7c4ce7614d55b50c1d24f6f2f7a790
Change bn_expand()/bn_wexpand() to indicate failure/success via 0/1.

Currently bn_expand()/bn_wexpand() return a BIGNUM *, however none of the
callers use this (and many already treat it as a true/false value).
Change these functions to return 0 on failure and 1 on success, revising
callers that test against NULL in the process.

ok tb@
15 files changed:
lib/libcrypto/bn/bn_add.c
lib/libcrypto/bn/bn_div.c
lib/libcrypto/bn/bn_exp.c
lib/libcrypto/bn/bn_gf2m.c
lib/libcrypto/bn/bn_lcl.h
lib/libcrypto/bn/bn_lib.c
lib/libcrypto/bn/bn_mont.c
lib/libcrypto/bn/bn_mul.c
lib/libcrypto/bn/bn_print.c
lib/libcrypto/bn/bn_shift.c
lib/libcrypto/bn/bn_sqr.c
lib/libcrypto/bn/bn_word.c
lib/libcrypto/ec/ec2_smpl.c
lib/libcrypto/ec/ecp_nistz256.c
lib/libcrypto/ec/ecp_smpl.c