summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormcgreer%netscape.com <devnull@localhost>2000-11-17 01:01:36 +0000
committermcgreer%netscape.com <devnull@localhost>2000-11-17 01:01:36 +0000
commit337483096c6afdfe79ec08868f3337a60e9de7f2 (patch)
treede99edce763c2f1605acb72865c285585744a85b
parent38087cddf3c1e6f4289722cb2ee4ea6f164293a5 (diff)
downloadnss-hg-337483096c6afdfe79ec08868f3337a60e9de7f2.tar.gz
return SEC_ERR_NEED_RANDOM when the RNG does not have sufficient seeding data to proceed.
-rw-r--r--security/nss/lib/freebl/prng_fips1861.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/security/nss/lib/freebl/prng_fips1861.c b/security/nss/lib/freebl/prng_fips1861.c
index 428b29f4f..3945de6e6 100644
--- a/security/nss/lib/freebl/prng_fips1861.c
+++ b/security/nss/lib/freebl/prng_fips1861.c
@@ -371,8 +371,7 @@ prng_GenerateGlobalRandomBytes(RNGContext *rng,
*/
if (rng->seedCount < MIN_SEED_COUNT) {
PR_Unlock(rng->lock);
- /* XXX this should be a new error code */
- PORT_SetError(SEC_ERROR_INVALID_ARGS);
+ PORT_SetError(SEC_ERROR_NEED_RANDOM);
return SECFailure;
}
/*