summaryrefslogtreecommitdiffstats
path: root/fips/rand
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-04-05 15:48:05 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-04-05 15:48:05 +0000
commit42bd0a6b3c73c71b69967503c0ee0a3598b52655 (patch)
treee1477bf5e29198335e8c7747ec4d28bc881d60ba /fips/rand
parent05e24c87dd1428809d6eaebf754b472a6cb4bb50 (diff)
Update fipssyms.h to keep all symbols in FIPS,fips namespace.
Rename drbg_cprng_test to fips_drbg_cprng_test. Remove rand files from Makefile.fips.
Diffstat (limited to 'fips/rand')
-rw-r--r--fips/rand/fips_drbg_ctr.c4
-rw-r--r--fips/rand/fips_drbg_hash.c4
-rw-r--r--fips/rand/fips_drbg_lib.c2
-rw-r--r--fips/rand/fips_rand_lcl.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/fips/rand/fips_drbg_ctr.c b/fips/rand/fips_drbg_ctr.c
index 2a3c321618..4045e2d627 100644
--- a/fips/rand/fips_drbg_ctr.c
+++ b/fips/rand/fips_drbg_ctr.c
@@ -340,13 +340,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;
diff --git a/fips/rand/fips_drbg_hash.c b/fips/rand/fips_drbg_hash.c
index 8b49f33a63..a94170f135 100644
--- a/fips/rand/fips_drbg_hash.c
+++ b/fips/rand/fips_drbg_hash.c
@@ -204,13 +204,13 @@ static int hash_gen(DRBG_CTX *dctx, unsigned char *out, size_t outlen)
if (outlen < dctx->blocklength)
{
FIPS_digestfinal(&hctx->mctx, hctx->vtmp, NULL);
- if (!drbg_cprng_test(dctx, hctx->vtmp))
+ if (!fips_drbg_cprng_test(dctx, hctx->vtmp))
return 0;
memcpy(out, hctx->vtmp, outlen);
return 1;
}
FIPS_digestfinal(&hctx->mctx, out, NULL);
- if (!drbg_cprng_test(dctx, out))
+ if (!fips_drbg_cprng_test(dctx, out))
return 0;
outlen -= dctx->blocklength;
if (outlen == 0)
diff --git a/fips/rand/fips_drbg_lib.c b/fips/rand/fips_drbg_lib.c
index 920a61a97a..7a0a1070e2 100644
--- a/fips/rand/fips_drbg_lib.c
+++ b/fips/rand/fips_drbg_lib.c
@@ -406,7 +406,7 @@ void FIPS_drbg_stick(void)
}
/* Continuous DRBG utility function */
-int drbg_cprng_test(DRBG_CTX *dctx, const unsigned char *out)
+int fips_drbg_cprng_test(DRBG_CTX *dctx, const unsigned char *out)
{
/* No CPRNG in test mode */
if (dctx->flags & DRBG_FLAG_TEST)
diff --git a/fips/rand/fips_rand_lcl.h b/fips/rand/fips_rand_lcl.h
index 2d63409537..94f58ea4cd 100644
--- a/fips/rand/fips_rand_lcl.h
+++ b/fips/rand/fips_rand_lcl.h
@@ -185,4 +185,4 @@ struct drbg_ctx_st
int fips_drbg_ctr_init(DRBG_CTX *dctx);
int fips_drbg_hash_init(DRBG_CTX *dctx);
int fips_drbg_kat(DRBG_CTX *dctx, int nid, unsigned int flags);
-int drbg_cprng_test(DRBG_CTX *dctx, const unsigned char *out);
+int fips_drbg_cprng_test(DRBG_CTX *dctx, const unsigned char *out);