]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Reduce ifdef soup by adding pre-3.0 compat support
authorEnji Cooper <ngie@FreeBSD.org>
Sat, 27 May 2023 21:07:45 +0000 (14:07 -0700)
committerEnji Cooper <ngie@FreeBSD.org>
Sun, 28 May 2023 00:05:39 +0000 (17:05 -0700)
commitdcf5d5603b3af831002caa7b2f64aec8bda14071
treed9b7460bbeb5f853d74c3966e257909406af5069
parent11ce203e0535c1c8f520c9bda81ab9326cf5db80
Reduce ifdef soup by adding pre-3.0 compat support

This change creates a static inline function, BN_check_prime, for
pre-3.0 use which is implemented with the previous (1.1) compatible call
under the covers, `BN_is_prime_ex`.

The `nchecks` parameter value is maintained, even though it has no
noticable behavior change, given that the documentation clearly states
that at least 64 or 128 rounds are executed on the backend, depending on
how many bits there are in the given number being factored out.

MFC after: 1 week
Differential Revision:  https://reviews.freebsd.org/D40305
usr.bin/factor/factor.c