crypto/openssl: fix out-of-place encryption
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 14 Apr 2020 17:25:55 +0000 (18:25 +0100)
committerAkhil Goyal <akhil.goyal@nxp.com>
Sun, 19 Apr 2020 15:15:14 +0000 (17:15 +0200)
commit1fa538faeb962ec7f54a1cdf8cba5271de15e17d
treedc8d74094a2bebe5bbde104a57ac4d6df747d560
parent6bba97cb6f387c78c1aa7ce5159a36a293df399e
crypto/openssl: fix out-of-place encryption

When authenticating after encrypting, if the operation
is out-of-place, the destination buffer is the one
that will get authenticated.
If the cipher offset is higher than the authentication
offset, it means that part of the text to authenticate
will be plaintext, so this needs to get copied to the
destination buffer, or the result will be incorrect.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
drivers/crypto/openssl/rte_openssl_pmd.c