]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
fips140: reset the reseed counter only on reseed
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 3 Jun 2015 13:38:09 +0000 (15:38 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 4 Jun 2015 11:41:18 +0000 (13:41 +0200)
lib/nettle/int/drbg-aes.c

index 6835385356b67bc0ca9bf85987caa7f84a787ef0..f8b693bcd104a1b7966ca6a3a1e214aac85ca120 100644 (file)
@@ -67,7 +67,6 @@ drbg_aes_update(struct drbg_aes_ctx *ctx,
 
        memcpy(ctx->v, &tmp[DRBG_AES_KEY_SIZE], AES_BLOCK_SIZE);
 
-       ctx->reseed_counter = 1;
        ctx->seeded = 1;
 }
 
@@ -93,6 +92,7 @@ drbg_aes_reseed(struct drbg_aes_ctx *ctx,
        memxor(tmp, entropy, entropy_size);
 
        drbg_aes_update(ctx, tmp);
+       ctx->reseed_counter = 1;
 
        return 1;
 }