Correct maximum request length. SP800-90 quotes maximum bits, not bytes.
[openssl.git] / fips / rand / fips_drbg_ctr.c
index 2a3c321618dcbc145d585f1a72f3bea22283c5e3..47abec651d6f305e75f6c434e88108d1ff143297 100644 (file)
@@ -54,8 +54,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <openssl/crypto.h>
-#include <openssl/evp.h>
-#include <openssl/aes.h>
 #include <openssl/fips.h>
 #include <openssl/fips_rand.h>
 #include "fips_rand_lcl.h"
@@ -340,13 +338,13 @@ static int drbg_ctr_generate(DRBG_CTX *dctx,
                        {
                        /* Use K as temp space as it will be updated */
                        AES_encrypt(cctx->V, cctx->K, &cctx->ks);
-                       if (!drbg_cprng_test(dctx, cctx->K))
+                       if (!fips_drbg_cprng_test(dctx, cctx->K))
                                return 0;
                        memcpy(out, cctx->K, outlen);
                        break;
                        }
                AES_encrypt(cctx->V, out, &cctx->ks);
-               if (!drbg_cprng_test(dctx, out))
+               if (!fips_drbg_cprng_test(dctx, out))
                        return 0;
                out += 16;
                outlen -= 16;
@@ -431,7 +429,7 @@ int fips_drbg_ctr_init(DRBG_CTX *dctx)
                dctx->max_adin = dctx->seedlen;
                }
 
-       dctx->max_request = 1<<19;
+       dctx->max_request = 1<<16;
        dctx->reseed_interval = 1<<24;
 
        return 1;