diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2009-11-29 01:04:10 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2009-11-29 01:04:10 +0200 |
commit | a5a1f7eac398192060b6b1c5aae79a6695791b59 (patch) | |
tree | 2af4d1d0eff9e5301bdbdd0b288d587d86caa2cd | |
parent | 30181c1a49a63fddc97dd10dbac1b49568aede1f (diff) | |
download | cryptodev-linux-a5a1f7eac398192060b6b1c5aae79a6695791b59.tar.gz cryptodev-linux-a5a1f7eac398192060b6b1c5aae79a6695791b59.tar.xz cryptodev-linux-a5a1f7eac398192060b6b1c5aae79a6695791b59.zip |
Only check that size is multiple of blocksize on ciphers.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cryptodev.c | 2 | ||||
-rw-r--r-- | cryptodev.h | 2 |
3 files changed, 3 insertions, 3 deletions
@@ -8,7 +8,7 @@ build: install: make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install @echo "Installing cryptodev.h in /usr/include/crypto ..." - @install -D cryptodev.h /usr/include/crypto + @install -D cryptodev.h /usr/include/crypto/cryptodev.h clean: make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean 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)); diff --git a/cryptodev.h b/cryptodev.h index 891ad2a..55c3279 100644 --- a/cryptodev.h +++ b/cryptodev.h @@ -49,7 +49,7 @@ enum { CRYPTO_ALGORITHM_MAX }; -#define CRYPTO_CIPHER_MAX_KEY_LEN 512 +#define CRYPTO_CIPHER_MAX_KEY_LEN 64 #define CRYPTO_HMAC_MAX_KEY_LEN 512 #define HASH_MAX_LEN 64 |