summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Franzki <ifranzki@linux.ibm.com>2025-01-08 16:00:33 +0100
committerTomas Mraz <tomas@openssl.org>2025-01-13 11:47:29 +0100
commitb8028d489037033a6eaa02b11755e5be0e688523 (patch)
tree39ba004d213ee661d27ee121a1496f89b986e19b
parentTweak case of [fs] variant letter in SLH-DSA algorithms (diff)
downloadopenssl-b8028d489037033a6eaa02b11755e5be0e688523.tar.xz
openssl-b8028d489037033a6eaa02b11755e5be0e688523.zip
speed: Pass IV to EVP_CipherInit_ex for -evp runs with non-AEAD ciphers
Some (non-AEAD) ciphers require an IV to be used. Always pass a (dummy) IV when setting the key. It is ignored by ciphers that do not use an IV. Commit 607a46d003f472d4bce646f3df6e85725094d68a corrected the use of AEAD ciphers, but removed the IV from being passed to EVP_CipherInit_ex() for non-AEAD ciphers. Fixes: https://github.com/openssl/openssl/commit/607a46d003f472d4bce646f3df6e85725094d68a Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Hugo Landau <hlandau@devever.net> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26346)
-rw-r--r--apps/speed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/speed.c b/apps/speed.c
index 561e641158..972e576760 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -2999,7 +2999,7 @@ int speed_main(int argc, char **argv)
if (!ae_mode) {
if (!EVP_CipherInit_ex(loopargs[k].ctx, NULL, NULL,
- loopargs[k].key, NULL, -1)) {
+ loopargs[k].key, iv, -1)) {
BIO_printf(bio_err, "\nFailed to set the key\n");
dofail();
exit(1);