summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/crypto/bn/bn_rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/crypto/bn/bn_rand.c')
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_rand.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/libssl/src/crypto/bn/bn_rand.c b/src/lib/libssl/src/crypto/bn/bn_rand.c
index 75b6b0493b..91b8e34ae6 100644
--- a/src/lib/libssl/src/crypto/bn/bn_rand.c
+++ b/src/lib/libssl/src/crypto/bn/bn_rand.c
@@ -60,13 +60,9 @@
60#include <time.h> 60#include <time.h>
61#include "cryptlib.h" 61#include "cryptlib.h"
62#include "bn_lcl.h" 62#include "bn_lcl.h"
63#include "rand.h" 63#include <openssl/rand.h>
64 64
65int BN_rand(rnd, bits, top, bottom) 65int BN_rand(BIGNUM *rnd, int bits, int top, int bottom)
66BIGNUM *rnd;
67int bits;
68int top;
69int bottom;
70 { 66 {
71 unsigned char *buf=NULL; 67 unsigned char *buf=NULL;
72 int ret=0,bit,bytes,mask; 68 int ret=0,bit,bytes,mask;
@@ -85,7 +81,7 @@ int bottom;
85 81
86 /* make a random number and set the top and bottom bits */ 82 /* make a random number and set the top and bottom bits */
87 time(&tim); 83 time(&tim);
88 RAND_seed((unsigned char *)&tim,sizeof(tim)); 84 RAND_seed(&tim,sizeof(tim));
89 85
90 RAND_bytes(buf,(int)bytes); 86 RAND_bytes(buf,(int)bytes);
91 if (top) 87 if (top)