Add tests for return codes for EVP_CIPHER_CTX_get[block_size|iv_length]

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)
This commit is contained in:
Neil Horman 2023-12-11 13:17:26 -05:00
parent 6f22bcd631
commit 72062fca28
1 changed files with 0 additions and 4 deletions

View 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;