summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2007-07-02 11:27:52 +0000
committerDr. Stephen Henson <steve@openssl.org>2007-07-02 11:27:52 +0000
commitaf13a3949d2f15699060f6703b453870f1a5c5ea (patch)
treed91c81d846ca293528cc2fddcdbe6bfbba465519
parentffc35e73b49cc2069ad879b0d065810f031d5570 (diff)
Check selftest in rand too.
-rw-r--r--fips-1.0/rand/fips_rand.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fips-1.0/rand/fips_rand.c b/fips-1.0/rand/fips_rand.c
index 153e8a1c46..9735394aaf 100644
--- a/fips-1.0/rand/fips_rand.c
+++ b/fips-1.0/rand/fips_rand.c
@@ -76,6 +76,7 @@
# endif
#endif
#include <string.h>
+#include <openssl/fips.h>
#ifdef OPENSSL_FIPS
@@ -120,6 +121,7 @@ void fips_rand_prng_reset(FIPS_PRNG_CTX *ctx)
static int fips_set_prng_key(FIPS_PRNG_CTX *ctx,
const unsigned char *key, FIPS_RAND_SIZE_T keylen)
{
+ FIPS_selftest_check();
if (keylen != 16 && keylen != 24 && keylen != 32)
{
/* error: invalid key size */