Latest update.

This commit is contained in:
2019-05-23 12:02:56 +09:00
parent a7bf77581f
commit 64d458de91
185 changed files with 5859 additions and 2853 deletions
+12 -2
View File
@@ -1101,6 +1101,17 @@ static int drbg_add(const void *buf, int num, double randomness)
buflen = (size_t)num;
#ifdef FIPS_MODE
/*
* NIST SP-800-90A mandates that entropy *shall not* be provided
* by the consuming application. By setting the randomness to zero,
* we ensure that the buffer contents will be added to the internal
* state of the DRBG only as additional data.
*
* (NIST SP-800-90Ar1, Sections 9.1 and 9.2)
*/
randomness = 0.0;
#endif
if (buflen < seedlen || randomness < (double) seedlen) {
#if defined(OPENSSL_RAND_SEED_NONE)
/*
@@ -1117,7 +1128,7 @@ static int drbg_add(const void *buf, int num, double randomness)
return ret;
#else
/*
* If an os entropy source is avaible then we declare the buffer content
* If an os entropy source is available then we declare the buffer content
* as additional data by setting randomness to zero and trigger a regular
* reseeding.
*/
@@ -1125,7 +1136,6 @@ static int drbg_add(const void *buf, int num, double randomness)
#endif
}
if (randomness > (double)seedlen) {
/*
* The purpose of this check is to bound |randomness| by a