diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2011-03-31 17:23:12 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2011-03-31 17:23:12 +0000 |
commit | e06de4dd3597374ab67281736be8dee0e2552bcd (patch) | |
tree | d7b13a395cc6261693820fb289a33df76bc366b5 /fips/rand | |
parent | 52b6ee8245c06042fd4f1bfea32f652ebe1774f3 (diff) |
Remove redundant definitions. Give error code if DRBG sefltest fails.
Diffstat (limited to 'fips/rand')
-rw-r--r-- | fips/rand/fips_drbg_selftest.c | 2 | ||||
-rw-r--r-- | fips/rand/fips_rand_lcl.h | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/fips/rand/fips_drbg_selftest.c b/fips/rand/fips_drbg_selftest.c index a3732c1a4a..c46fe58521 100644 --- a/fips/rand/fips_drbg_selftest.c +++ b/fips/rand/fips_drbg_selftest.c @@ -797,6 +797,8 @@ static int fips_drbg_single_kat(DRBG_CTX *dctx, DRBG_SELFTEST_DATA *td) rv = 1; err: + if (rv == 0) + FIPSerr(FIPS_F_FIPS_DRBG_SINGLE_KAT, FIPS_R_SELFTEST_FAILED); FIPS_drbg_uninstantiate(dctx); return rv; diff --git a/fips/rand/fips_rand_lcl.h b/fips/rand/fips_rand_lcl.h index b3962260ed..a946ac1ed8 100644 --- a/fips/rand/fips_rand_lcl.h +++ b/fips/rand/fips_rand_lcl.h @@ -97,10 +97,6 @@ struct drbg_ctr_ctx_st /* fatal error condition */ #define DRBG_STATUS_ERROR 3 -/* Maximum values for temp entropy and nonce */ -#define DRBG_MAX_ENTROPY 1024 -#define DRBG_MAX_NONCE 1024 - /* A default maximum length: larger than any reasonable value used in pratice */ #define DRBG_MAX_LENGTH 0x7ffffff0 @@ -159,8 +155,6 @@ struct drbg_ctx_st /* Indicates we have finished with entropy buffer */ void (*cleanup_entropy)(DRBG_CTX *ctx, unsigned char *out, size_t olen); - unsigned char nonce[DRBG_MAX_NONCE]; - /* nonce gathering function */ size_t (*get_nonce)(DRBG_CTX *ctx, unsigned char **pout, int entropy, size_t min_len, size_t max_len); |