]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add tests for return codes for EVP_CIPHER_CTX_get[block_size|iv_length]
authorNeil Horman <nhorman@openssl.org>
Mon, 11 Dec 2023 18:17:26 +0000 (13:17 -0500)
committerNeil Horman <nhorman@openssl.org>
Thu, 25 Jan 2024 13:36:17 +0000 (08:36 -0500)
make sure that we get the expected error codes when we do bad things,
rather than a crash

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22995)

test/tls13encryptiontest.c

index c696e62d2ecdb6191b09ef05076de8666de3f95d..f1e6490f9f900b810bd19642d3e7e5cd2c191f48 100644 (file)
@@ -326,10 +326,6 @@ static int test_tls13_encryption(void)
     for (ctr = 0; ctr < OSSL_NELEM(refdata); ctr++) {
         /* Load the record */
         ivlen = EVP_CIPHER_get_iv_length(ciph);
-        if (TEST_int_eq((int)ivlen, -1)) {
-            TEST_error("IV length undefined");
-            goto err;
-        }
         if (!load_record(&rec, &refdata[ctr], &key, iv, ivlen, seqbuf)) {
             TEST_error("Failed loading key into EVP_CIPHER_CTX");
             goto err;