mirror of
https://github.com/openssl/openssl.git
synced 2026-05-07 20:12:39 +00:00
Test that there is no silent error in EVP_CIPHER_CTX_get_updated_iv in evp_test
Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/27120)
This commit is contained in:
committed by
Matt Caswell
parent
24bc185439
commit
418609e115
@@ -5171,6 +5171,11 @@ static int test_evp_updated_iv(int idx)
|
||||
if (!TEST_true(EVP_CIPHER_CTX_get_updated_iv(ctx, updated_iv, sizeof(updated_iv)))) {
|
||||
errmsg = "CIPHER_CTX_GET_UPDATED_IV";
|
||||
goto err;
|
||||
} else {
|
||||
if (!TEST_false(ERR_peek_error())) {
|
||||
errmsg = "CIPHER_CTX_GET_UPDATED_IV_SILENT_ERROR";
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
iv_len = EVP_CIPHER_CTX_get_iv_length(ctx);
|
||||
if (!TEST_int_ge(iv_len,0)) {
|
||||
|
||||
@@ -1218,6 +1218,11 @@ static int cipher_test_enc(EVP_TEST *t, int enc, size_t out_misalign,
|
||||
expected->iv_len))) {
|
||||
t->err = "INVALID_IV";
|
||||
goto err;
|
||||
} else {
|
||||
if (!TEST_false(ERR_peek_error())) {
|
||||
t->err = "GET_UPDATED_IV_SILENT_ERROR";
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1509,6 +1514,11 @@ static int cipher_test_enc(EVP_TEST *t, int enc, size_t out_misalign,
|
||||
expected->iv_len))) {
|
||||
t->err = "INVALID_NEXT_IV";
|
||||
goto err;
|
||||
} else {
|
||||
if (!TEST_false(ERR_peek_error())) {
|
||||
t->err = "GET_UPDATED_IV_SILENT_ERROR";
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user