summaryrefslogtreecommitdiffstats
path: root/cryptodev.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2009-11-29 01:04:10 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2009-11-29 01:04:10 +0200
commita5a1f7eac398192060b6b1c5aae79a6695791b59 (patch)
tree2af4d1d0eff9e5301bdbdd0b288d587d86caa2cd /cryptodev.c
parent30181c1a49a63fddc97dd10dbac1b49568aede1f (diff)
downloadcryptodev-linux-a5a1f7eac398192060b6b1c5aae79a6695791b59.tar.gz
cryptodev-linux-a5a1f7eac398192060b6b1c5aae79a6695791b59.tar.xz
cryptodev-linux-a5a1f7eac398192060b6b1c5aae79a6695791b59.zip
Only check that size is multiple of blocksize on ciphers.
Diffstat (limited to 'cryptodev.c')
-rw-r--r--cryptodev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cryptodev.c b/cryptodev.c
index 76581c4..f09a38d 100644
--- a/cryptodev.c
+++ b/cryptodev.c
@@ -465,7 +465,7 @@ static int crypto_runv(struct fcrypt *fcr, struct crypt_opv *copv)
for (i=0;i<copv->iovec_cnt;i++) {
nbytes = copv->iovec[i].len;
- if (unlikely(bdesc.tfm && (nbytes % blocksize))) {
+ if (unlikely(bdesc.tfm && (copv->iovec[i].op_flags & IOP_CIPHER) && (nbytes % blocksize))) {
dprintk(1, KERN_ERR,
"data size (%zu) isn't a multiple of block size (%u)\n",
nbytes, crypto_blkcipher_blocksize(ses_ptr->tfm));