summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevitte <levitte>2004-03-15 22:35:53 +0000
committerlevitte <levitte>2004-03-15 22:35:53 +0000
commit21630cae5963251e11729fe06615072abcd6bc09 (patch)
tree527eb2f414a5aa2feed91612be7b942661631055
parentc5dda5270a40600652e889376b2fe9f0561c17bc (diff)
downloadopenssl-21630cae5963251e11729fe06615072abcd6bc09.tar.gz
Make sure that the last argument to RAND_add() is a float, or some
compilers may complain.
-rw-r--r--crypto/rand/md_rand.c2
-rw-r--r--crypto/rand/rand_unix.c8
-rw-r--r--crypto/rsa/rsa_eay.c2
-rw-r--r--crypto/rsa/rsa_lib.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c
index 66b229c9b..303e5898c 100644
--- a/crypto/rand/md_rand.c
+++ b/crypto/rand/md_rand.c
@@ -315,7 +315,7 @@ static void ssleay_rand_add(const void *buf, int num, double add)
static void ssleay_rand_seed(const void *buf, int num)
{
- ssleay_rand_add(buf, num, num);
+ ssleay_rand_add(buf, num, (float)num);
}
static int ssleay_rand_bytes(unsigned char *buf, int num)
diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c
index ef8020121..aef6914bb 100644
--- a/crypto/rand/rand_unix.c
+++ b/crypto/rand/rand_unix.c
@@ -233,19 +233,19 @@ int RAND_poll(void)
#if defined(DEVRANDOM) || defined(DEVRANDOM_EGD)
if (n > 0)
{
- RAND_add(tmpbuf,sizeof tmpbuf,n);
+ RAND_add(tmpbuf,sizeof tmpbuf,(float)n);
OPENSSL_cleanse(tmpbuf,n);
}
#endif
/* put in some default random data, we need more than just this */
l=curr_pid;
- RAND_add(&l,sizeof(l),0);
+ RAND_add(&l,sizeof(l),0.0);
l=getuid();
- RAND_add(&l,sizeof(l),0);
+ RAND_add(&l,sizeof(l),0.0);
l=time(NULL);
- RAND_add(&l,sizeof(l),0);
+ RAND_add(&l,sizeof(l),0.0);
#if defined(DEVRANDOM) || defined(DEVRANDOM_EGD)
return 1;
diff --git a/crypto/rsa/rsa_eay.c b/crypto/rsa/rsa_eay.c
index ee2a70bb4..5beb9c9fd 100644
--- a/crypto/rsa/rsa_eay.c
+++ b/crypto/rsa/rsa_eay.c
@@ -243,7 +243,7 @@ static BN_BLINDING *setup_blinding(RSA *rsa, BN_CTX *ctx)
if ((RAND_status() == 0) && rsa->d != NULL && rsa->d->d != NULL)
{
/* if PRNG is not properly seeded, resort to secret exponent as unpredictable seed */
- RAND_add(rsa->d->d, rsa->d->dmax * sizeof rsa->d->d[0], 0);
+ RAND_add(rsa->d->d, rsa->d->dmax * sizeof rsa->d->d[0], 0.0);
if (!BN_pseudo_rand_range(A,rsa->n)) goto err;
}
else
diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c
index e4d622851..cba2dd66c 100644
--- a/crypto/rsa/rsa_lib.c
+++ b/crypto/rsa/rsa_lib.c
@@ -343,7 +343,7 @@ int RSA_blinding_on(RSA *rsa, BN_CTX *p_ctx)
if ((RAND_status() == 0) && rsa->d != NULL && rsa->d->d != NULL)
{
/* if PRNG is not properly seeded, resort to secret exponent as unpredictable seed */
- RAND_add(rsa->d->d, rsa->d->dmax * sizeof rsa->d->d[0], 0);
+ RAND_add(rsa->d->d, rsa->d->dmax * sizeof rsa->d->d[0], 0.0);
if (!BN_pseudo_rand_range(A,rsa->n)) goto err;
}
else