Fix an endless loop in BN_generate_prime_ex
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 4 Jul 2019 15:56:23 +0000 (17:56 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 7 Jul 2019 06:05:33 +0000 (08:05 +0200)
commit291f616ced45c924d639d97fc9ca2cbeaad096cf
tree86fbc3f0f65398c02bbad3f975f5d36bd69c2a06
parent2a1e2fe145c6eb8e75aa2e1b3a8c3a49384b2852
Fix an endless loop in BN_generate_prime_ex

Happens when trying to generate 4 or 5 bit safe primes.

[extended tests]

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9311)
crypto/bn/bn_prime.c
test/bntest.c