Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257941
b: refs/heads/master
c: 1c2b4ab
h: refs/heads/master
i:
  257939: f992ebd
v: v3
  • Loading branch information
Kim Phillips authored and Herbert Xu committed Jul 15, 2011
1 parent 4e49fc4 commit b852f15
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: febec54286623a540cbe483a5d471ff6576a6e2e
refs/heads/master: 1c2b4abb19285368808f303ad61e17b172f1a108
11 changes: 0 additions & 11 deletions trunk/drivers/crypto/talitos.c
Original file line number Diff line number Diff line change
Expand Up @@ -1378,22 +1378,11 @@ static int ablkcipher_setkey(struct crypto_ablkcipher *cipher,
const u8 *key, unsigned int keylen)
{
struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher);
struct ablkcipher_alg *alg = crypto_ablkcipher_alg(cipher);

if (keylen > TALITOS_MAX_KEY_SIZE)
goto badkey;

if (keylen < alg->min_keysize || keylen > alg->max_keysize)
goto badkey;

memcpy(&ctx->key, key, keylen);
ctx->keylen = keylen;

return 0;

badkey:
crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN);
return -EINVAL;
}

static void common_nonsnoop_unmap(struct device *dev,
Expand Down

0 comments on commit b852f15

Please sign in to comment.