diff options
author | John Baldwin <jhb@FreeBSD.org> | 2020-08-06 01:24:24 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-08-31 10:34:19 +0200 |
commit | 72c1e37421ffe9a4db4bba46f3d736dbc227c255 (patch) | |
tree | c1f36edf740c4d6dee4be8a317a61d9d59e74226 /test/sslapitest.c | |
parent | Fix two issues with AES-CCM KTLS tests. (diff) | |
download | openssl-72c1e37421ffe9a4db4bba46f3d736dbc227c255.tar.xz openssl-72c1e37421ffe9a4db4bba46f3d736dbc227c255.zip |
Use global 'libctx' with RAND_bytes_ex to generate sendfile temp data.
While here, check for failure from RAND_bytes_ex as well.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12111)
Diffstat (limited to 'test/sslapitest.c')
-rw-r--r-- | test/sslapitest.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/sslapitest.c b/test/sslapitest.c index cbb488ca26..240cadde90 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -1118,7 +1118,9 @@ static int test_ktls_sendfile(int tls_version, const char *cipher) || !TEST_true(BIO_get_ktls_send(serverssl->wbio))) goto end; - RAND_bytes(buf, SENDFILE_SZ); + if (!TEST_true(RAND_bytes_ex(libctx, buf, SENDFILE_SZ))) + goto end; + out = BIO_new_file(tmpfilename, "wb"); if (!TEST_ptr(out)) goto end; |