summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Azarewicz <piotrx.t.azarewicz@intel.com>2017-01-09 15:45:36 +0100
committerPablo de Lara <pablo.de.lara.guarch@intel.com>2017-01-18 21:48:56 +0100
commit5d63ef31d8a51bb318d10c4d0ce99cc4184a6d70 (patch)
tree9ad7cbdf6909d7b0328bb6464c13b1a62f63367f
parente2a7fdce6deb6de81a71cfa7c6f2245c52d8e39b (diff)
downloaddpdk-5d63ef31d8a51bb318d10c4d0ce99cc4184a6d70.zip
dpdk-5d63ef31d8a51bb318d10c4d0ce99cc4184a6d70.tar.gz
dpdk-5d63ef31d8a51bb318d10c4d0ce99cc4184a6d70.tar.xz
crypto/openssl: remove unneeded check
EVP_CIPHER_CTX_set_padding() function always returns 1, so the check is unneeded. Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library") Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com> Tested-by: Zhaoyan Chen <zhaoyan.chen@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
-rw-r--r--drivers/crypto/openssl/rte_openssl_pmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 832ea1d..312154a 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -522,8 +522,7 @@ process_openssl_cipher_decrypt(uint8_t *src, uint8_t *dst,
if (EVP_DecryptInit_ex(ctx, algo, NULL, key, iv) <= 0)
goto process_cipher_decrypt_err;
- if (EVP_CIPHER_CTX_set_padding(ctx, 0) <= 0)
- goto process_cipher_decrypt_err;
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
if (EVP_DecryptUpdate(ctx, dst, &dstlen, src, srclen) <= 0)
goto process_cipher_decrypt_err;