]> git.droids-corp.org - dpdk.git/commitdiff
crypto/openssl: remove unneeded check
authorPiotr Azarewicz <piotrx.t.azarewicz@intel.com>
Mon, 9 Jan 2017 14:45:36 +0000 (15:45 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 18 Jan 2017 20:48:56 +0000 (21:48 +0100)
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>
drivers/crypto/openssl/rte_openssl_pmd.c

index 832ea1d0ba4a25e56bd9b8f79c6ffcdf6af94aca..312154a561dc29be32d141e043e8fd50ce72a558 100644 (file)
@@ -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;