Expose S390x HW ciphers' IV state to provider layer
authorBenjamin Kaduk <bkaduk@akamai.com>
Tue, 21 Jul 2020 23:23:19 +0000 (16:23 -0700)
committerBenjamin Kaduk <bkaduk@akamai.com>
Tue, 11 Aug 2020 14:07:58 +0000 (07:07 -0700)
commit520150151bc5993194ba34464220454d8135099d
treeb27e0520e46f994ffd9a856db4d7b96867c44eae
parentbdc0df8ab5f3096aafd54d170c85887366920c4b
Expose S390x HW ciphers' IV state to provider layer

The S390x hardware-accelerated cipher implementations keep their IV
state in an internal structure tied to the underlying implementation.
However, the provider itself needs to be able to expose the IV state
to libcrypto when processing the "iv-state" parameter.  In the absence
of a S390x hardware-specific get_ctx_params() implementation,  be sure
to copy the IV state from the hw-specific structure back to the
generic PROV_CIPHER_CTX object after each cipher operation in order to
synchronize the internal and fetchable state.

[extended tests]

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