Output buffer doesn't hold tag on decrypt, so no need to account for it in
the sizing.

 

Change-Id: I1a464c8f7e9e702dbc0446c38831c87a9d4a9a70

---

authenc.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

 

diff --git a/authenc.c b/authenc.c

index 718bb52..8bff677 100644

--- a/authenc.c

+++ b/authenc.c

@@ -664,7 +664,7 @@ __crypto_auth_run_zc(struct csession *ses_ptr, struct
kernel_crypt_auth_op *kcao

                                               }

                                                if (caop->op == COP_ENCRYPT)
dst_len = caop->len + cryptodev_cipher_get_tag_size(&ses_ptr->cdata);

-                                              else dst_len = caop->len -
cryptodev_cipher_get_tag_size(&ses_ptr->cdata);

+                                              else dst_len = caop->len;

                                                ret = get_userbuf(ses_ptr,
caop->src, caop->len, caop->dst, dst_len,

 
kcaop->task, kcaop->mm, &src_sg, &dst_sg);

-- 

1.7.11.1

 

_______________________________________________
Cryptodev-linux-devel mailing list
Cryptodev-linux-devel@gna.org
https://mail.gna.org/listinfo/cryptodev-linux-devel

Reply via email to