lkml.org 
[lkml]   [2008]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ansi_cprng: zero out key data on exit
On Fri, Nov 14, 2008 at 03:55:36PM -0500, Neil Horman wrote:
>
> diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c
> index 72db0fd..e6ad373 100644
> --- a/crypto/ansi_cprng.c
> +++ b/crypto/ansi_cprng.c
> @@ -266,6 +266,7 @@ done:
> static void free_prng_context(struct prng_context *ctx)
> {
> crypto_free_cipher(ctx->tfm);
> + memset(ctx, 0, sizeof(struct prng_context));
> }

crypto_free_tfm should already handle this, no?

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

\
 
 \ /
  Last update: 2008-11-24 14:25    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site