Fix incorrect check on RAND_bytes_ex() in generate_q_fips186_4()
authorNiels Dossche <niels.dossche@ugent.be>
Sat, 21 Jan 2023 12:34:34 +0000 (13:34 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 23 Jan 2023 09:40:26 +0000 (10:40 +0100)
commita2b01ae1c84ccc250d5d5cb5f2f8714573e3f11b
tree7d9a3ca73d72378052f1eb707b168197c5bcf398
parent1d857945324810f43a302c9d062c617207093387
Fix incorrect check on RAND_bytes_ex() in generate_q_fips186_4()

RAND_bytes_ex() can also return 0 on failure. Other callers do check
this correctly. Change the check from <0 to <=0.

Fixes: #20100
CLA: trivial

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20106)
crypto/ffc/ffc_params_generate.c