Use local IV storage in EVP BLOCK_* macros
authorBenjamin Kaduk <bkaduk@akamai.com>
Thu, 2 Jul 2020 21:12:33 +0000 (14:12 -0700)
committerBenjamin Kaduk <bkaduk@akamai.com>
Tue, 11 Aug 2020 14:07:58 +0000 (07:07 -0700)
commit2f5c405a1694220cca7be8cd96958c1c1245f0ed
tree746b575781af4a6881efbec03ff149ec817d983e
parentd91f902d73689c8a8c1bf684ff9d244197f8c7b3
Use local IV storage in EVP BLOCK_* macros

Inline the pre-13273237a65d46186b6bea0b51aec90670d4598a versions
of EVP_CIPHER_CTX_iv(), EVP_CIPHER_CTX_original_iv(), and
EVP_CIPHER_CTX_iv_noconst() in evp.h.

These macros are internal-only, used to implement legacy libcrypto
EVP ciphers, with no real provider involvement.  Accordingly, just use the
EVP_CIPHER_CTX storage directly and don't try to reach into a provider-side
context.

This does necessitate including evp_local.h in several more files.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12233)
crypto/evp/e_bf.c
crypto/evp/e_cast.c
crypto/evp/e_idea.c
crypto/evp/e_rc2.c
crypto/evp/e_seed.c
include/crypto/evp.h