From cd4b075abdc6d2415476df9a0990b55152332e68 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Tue, 15 Jun 2010 16:47:39 +0200 Subject: If alg->max_keysize==0, allow any key size. --- cryptodev_cipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptodev_cipher.c b/cryptodev_cipher.c index d42bb2e..2436803 100644 --- a/cryptodev_cipher.c +++ b/cryptodev_cipher.c @@ -77,7 +77,7 @@ int cryptodev_cipher_init(struct cipher_data* out, const char* alg_name, uint8_t if (alg != NULL) { /* Was correct key length supplied? */ - if (unlikely((keylen < alg->min_keysize) || + if (alg->max_keysize > 0 && unlikely((keylen < alg->min_keysize) || (keylen > alg->max_keysize))) { dprintk(1,KERN_DEBUG,"Wrong keylen '%zu' for algorithm '%s'. Use %u to %u.\n", keylen, alg_name, alg->min_keysize, -- cgit