summaryrefslogtreecommitdiffstats
path: root/test/tls-provider.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2021-11-14 17:20:32 +0100
committerPauli <pauli@openssl.org>2021-11-16 11:01:13 +0100
commitc9007bda79291179ed2df31b3dfd9f1311102847 (patch)
tree0da383c0402ddf179b0b687570852806a38a4683 /test/tls-provider.c
parentClarify the PEM docs (diff)
downloadopenssl-c9007bda79291179ed2df31b3dfd9f1311102847.tar.xz
openssl-c9007bda79291179ed2df31b3dfd9f1311102847.zip
RAND_bytes_ex: fix return check
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17032)
Diffstat (limited to 'test/tls-provider.c')
-rw-r--r--test/tls-provider.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/tls-provider.c b/test/tls-provider.c
index f8eeaeb363..9ac1db51b3 100644
--- a/test/tls-provider.c
+++ b/test/tls-provider.c
@@ -813,7 +813,7 @@ unsigned int randomize_tls_group_id(OSSL_LIB_CTX *libctx)
int i;
retry:
- if (!RAND_bytes_ex(libctx, (unsigned char *)&group_id, sizeof(group_id), 0))
+ if (RAND_bytes_ex(libctx, (unsigned char *)&group_id, sizeof(group_id), 0) <= 0)
return 0;
/*
* Ensure group_id is within the IANA Reserved for private use range