}
/* Create the random MAC we will emit if padding is bad */
- if (!RAND_bytes_ex(libctx, randmac, mac_size, 0))
+ if (RAND_bytes_ex(libctx, randmac, mac_size, 0) <= 0)
return 0;
if (!ossl_assert(mac != NULL && alloced != NULL))
* Do some work using the child libctx, to make sure this is possible from
* inside the init function.
*/
- if (!RAND_bytes_ex(libctx, buf, sizeof(buf), 0))
+ if (RAND_bytes_ex(libctx, buf, sizeof(buf), 0) <= 0)
return 0;
return 1;
goto end;
}
- if (!TEST_true(RAND_bytes_ex(libctx, buf, SENDFILE_SZ, 0)))
+ if (!TEST_int_gt(RAND_bytes_ex(libctx, buf, SENDFILE_SZ, 0), 0))
goto end;
out = BIO_new_file(tmpfilename, "wb");
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