Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132687
b: refs/heads/master
c: d7992f4
h: refs/heads/master
i:
  132685: 5f815c8
  132683: ab2680f
  132679: b1ac0ee
  132671: f1f51d2
v: v3
  • Loading branch information
Neil Horman authored and Herbert Xu committed Feb 18, 2009
1 parent 10c8c21 commit d882321
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: 54b6a1bd5364aca95cd6ffae00f2b64c6511122c
refs/heads/master: d7992f42c61d5dc6d164f7dddd05284485204ada
11 changes: 10 additions & 1 deletion trunk/crypto/ansi_cprng.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,16 @@ static int cprng_init(struct crypto_tfm *tfm)

spin_lock_init(&ctx->prng_lock);

return reset_prng_context(ctx, NULL, DEFAULT_PRNG_KSZ, NULL, NULL);
if (reset_prng_context(ctx, NULL, DEFAULT_PRNG_KSZ, NULL, NULL) < 0)
return -EINVAL;

/*
* after allocation, we should always force the user to reset
* so they don't inadvertently use the insecure default values
* without specifying them intentially
*/
ctx->flags |= PRNG_NEED_RESET;
return 0;
}

static void cprng_exit(struct crypto_tfm *tfm)
Expand Down

0 comments on commit d882321

Please sign in to comment.