summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_rand.c
diff options
context:
space:
mode:
authorbeck <>1999-09-29 04:37:45 +0000
committerbeck <>1999-09-29 04:37:45 +0000
commitde8f24ea083384bb66b32ec105dc4743c5663cdf (patch)
tree1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/bn/bn_rand.c
parentcb929d29896bcb87c2a97417fbd03e50078fc178 (diff)
downloadopenbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/bn/bn_rand.c')
-rw-r--r--src/lib/libcrypto/bn/bn_rand.c10
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
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)