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>
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;