CVSROOT: /cvs Module name: src Changes by: js...@cvs.openbsd.org 2022/12/17 08:56:25
Modified files: lib/libcrypto/bn: bn.h bn_isqrt.c bn_lib.c Log message: Provide BN_zero()/BN_one() as functions and make BN_zero() always succeed. BN_zero() is currently implemented using BN_set_word(), which means it can fail, however almost nothing ever checks the return value. A long time ago OpenSSL changed BN_zero() to always succeed and return void, however kept BN_zero as a macro that calls a new BN_zero_ex() function, so that it can be switched back to the "can fail" version. Take a simpler approach - change BN_zero()/BN_one() to functions and make BN_zero() always succeed. This will be exposed in the next bump, at which point we can hopefully also remove the BN_zero_ex() function. ok tb@