]> git.ipfire.org Git - thirdparty/openssl.git/commit
Make GCM providers more generous about fetching IVs
authorBenjamin Kaduk <bkaduk@akamai.com>
Sat, 20 Jun 2020 05:31:41 +0000 (22:31 -0700)
committerBenjamin Kaduk <bkaduk@akamai.com>
Tue, 11 Aug 2020 14:07:57 +0000 (07:07 -0700)
commitef58f9af93cdd75b9798cdb177319995dc7a7d50
tree9c026c981b4563fc2c4778463db3e89bec2164b9
parent440b852a0f79ac4a7e101606a7c32d212e06d203
Make GCM providers more generous about fetching IVs

The current check for iv_gen and iv_gen_rand only lets you fetch
the IV for the case when it was set internally.  It might also make
sense to fetch the IV if one was set at cipher-context creation time,
so switch to checking the iv_state, which should be enough to ensure
that there is valid data in the context to be copied out.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12233)
providers/implementations/ciphers/ciphercommon_gcm.c