Put quick DRBG selftest return after first generate operation.
authorDr. Stephen Henson <steve@openssl.org>
Wed, 7 Sep 2011 10:26:38 +0000 (10:26 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 7 Sep 2011 10:26:38 +0000 (10:26 +0000)
fips/rand/fips_drbg_selftest.c

index 3e18c98..a06c4fc 100644 (file)
@@ -226,6 +226,12 @@ static int fips_drbg_single_kat(DRBG_CTX *dctx, DRBG_SELFTEST_DATA *td,
                goto err2;
                }
 
+       if (quick)
+               {
+               rv = 1;
+               goto err;
+               }
+
        t.ent = td->entreseed;
        t.entlen = td->entreseedlen;
 
@@ -283,12 +289,6 @@ static int fips_drbg_single_kat(DRBG_CTX *dctx, DRBG_SELFTEST_DATA *td,
                goto err2;
                }
 
-       if (quick)
-               {
-               rv = 1;
-               goto err;
-               }
-
        t.ent = td->entg_pr;
        t.entlen = td->entglen_pr;