evp enc: cache cipher IV length
authorPauli <pauli@openssl.org>
Wed, 26 Jan 2022 04:04:51 +0000 (15:04 +1100)
committerPauli <pauli@openssl.org>
Sun, 6 Feb 2022 22:45:57 +0000 (09:45 +1100)
commitb30b45b7247d056b569e2b5139f8b503d36e646c
tree8ed00752ca97598a84af7f2b76cd7594eb4d846b
parent80ce874a093087b919e1c722427df30f81f5dad5
evp enc: cache cipher IV length

Instead of doing a heavy params based query every time a context is asked for
its IV length, this value is cached in the context and only queried if it could
have been modified.

Fixes #17064

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17543)
crypto/evp/evp_enc.c
crypto/evp/evp_lib.c
crypto/evp/evp_local.h