summaryrefslogtreecommitdiff
path: root/test/ecdsatest.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2022-05-28 23:46:33 +0800
committerTodd Short <todd.short@me.com>2022-06-02 10:36:56 -0400
commitc2f7614fb7b93fe3792068077ff01384f42f39bc (patch)
tree2a2a08618c7a1083c49010f6831ef6242f138909 /test/ecdsatest.c
parent163bf682fd93971d07e66e3da339c229b86dc849 (diff)
downloadopenssl-new-c2f7614fb7b93fe3792068077ff01384f42f39bc.tar.gz
Fix the checks of RAND_bytes
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from https://github.com/openssl/openssl/pull/18424)
Diffstat (limited to 'test/ecdsatest.c')
-rw-r--r--test/ecdsatest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ecdsatest.c b/test/ecdsatest.c
index 282b9660d3..0baeb89230 100644
--- a/test/ecdsatest.c
+++ b/test/ecdsatest.c
@@ -223,7 +223,7 @@ static int test_builtin(int n, int as)
if (!TEST_ptr(mctx = EVP_MD_CTX_new())
/* get some random message data */
- || !TEST_true(RAND_bytes(tbs, sizeof(tbs)))
+ || !TEST_int_gt(RAND_bytes(tbs, sizeof(tbs)), 0)
/* real key */
|| !TEST_ptr(eckey = EC_KEY_new_by_curve_name(nid))
|| !TEST_true(EC_KEY_generate_key(eckey))