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>
Fri, 19 Aug 2022 10:12:24 +0000 (20:12 +1000)
commit87ceff925f5f1d43dac0413f36c8b7bba94e4a41
tree1c78e05d36a11ec230c91a0462f0c2e29fd4bcba
parentd3072f3f3ba3a6385bd41473483c9ee81443b684
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>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18995)
crypto/evp/evp_enc.c
crypto/evp/evp_lib.c
crypto/evp/evp_local.h