summaryrefslogtreecommitdiffstats
path: root/test/bad_dtls_test.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/bad_dtls_test.c
parent163bf682fd93971d07e66e3da339c229b86dc849 (diff)
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/bad_dtls_test.c')
-rw-r--r--test/bad_dtls_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/bad_dtls_test.c b/test/bad_dtls_test.c
index 8849269173..2e12de2702 100644
--- a/test/bad_dtls_test.c
+++ b/test/bad_dtls_test.c
@@ -331,7 +331,7 @@ static int send_record(BIO *rbio, unsigned char type, uint64_t seqnr,
} while (len % 16);
/* Generate IV, and encrypt */
- if (!TEST_true(RAND_bytes(iv, sizeof(iv)))
+ if (!TEST_int_gt(RAND_bytes(iv, sizeof(iv)), 0)
|| !TEST_ptr(enc_ctx = EVP_CIPHER_CTX_new())
|| !TEST_true(EVP_CipherInit_ex(enc_ctx, EVP_aes_128_cbc(), NULL,
enc_key, iv, 1))