diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_rand.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_rand.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/libcrypto/bn/bn_rand.c b/src/lib/libcrypto/bn/bn_rand.c index 75b6b0493b..91b8e34ae6 100644 --- a/src/lib/libcrypto/bn/bn_rand.c +++ b/src/lib/libcrypto/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 | ||
65 | int BN_rand(rnd, bits, top, bottom) | 65 | int BN_rand(BIGNUM *rnd, int bits, int top, int bottom) |
66 | BIGNUM *rnd; | ||
67 | int bits; | ||
68 | int top; | ||
69 | int 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) |