10/10 ----------------------------
commit 1f6c3d31675ffb1b19c75c05eb849bd1a9cb6976 Author: Jaren Johnston <jaren's email> Date: Fri Jun 8 15:49:05 2012 -0700 crypto_auth_run: allow empty pt and aad Removed the guards against empty PT and empty AAD. It's an edge case that -- while it may not be too useful in practice -- is tested against during crypto validation. Change-Id: Ib3c0feea16a6a4a5b350dcba4c567ca6aaa846e9 diff --git a/authenc.c b/authenc.c index 9ceee2d..70f0f7b 100644 --- a/authenc.c +++ b/authenc.c @@ -730,17 +730,10 @@ int crypto_auth_run(struct fcrypt *fcr, struct kernel_crypt_auth_op *kcaop) cryptodev_cipher_set_iv(&ses_ptr->cdata, kcaop->iv, min(ses_ptr->cdata.ivsize, kcaop->ivlen)); - if (likely(caop->len || caop->auth_len)) { - ret = __crypto_auth_run_zc(ses_ptr, kcaop); - if (unlikely(ret)) { - dprintk(1, KERN_ERR, - "error in __crypto_auth_run_zc()\n"); - goto out_unlock; - } - } else { + ret = __crypto_auth_run_zc(ses_ptr, kcaop); + if (unlikely(ret)) { dprintk(1, KERN_ERR, - "Do not have auth data nor other data.\n"); - ret = -EINVAL; + "error in __crypto_auth_run_zc()\n"); goto out_unlock; }
_______________________________________________ Cryptodev-linux-devel mailing list Cryptodev-linux-devel@gna.org https://mail.gna.org/listinfo/cryptodev-linux-devel