diff options
author | beck <> | 2000-03-19 11:13:58 +0000 |
---|---|---|
committer | beck <> | 2000-03-19 11:13:58 +0000 |
commit | 796d609550df3a33fc11468741c5d2f6d3df4c11 (patch) | |
tree | 6c6d539061caa20372dad0ac4ddb1dfae2fbe7fe /src/lib/libcrypto/rand/rand_lib.c | |
parent | 5be3114c1fd7e0dfea1e38d3abb4cbba75244419 (diff) | |
download | openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.gz openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.bz2 openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.zip |
OpenSSL 0.9.5 merge
*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
Diffstat (limited to 'src/lib/libcrypto/rand/rand_lib.c')
-rw-r--r-- | src/lib/libcrypto/rand/rand_lib.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/lib/libcrypto/rand/rand_lib.c b/src/lib/libcrypto/rand/rand_lib.c index 34c6d5b968..b09a300c46 100644 --- a/src/lib/libcrypto/rand/rand_lib.c +++ b/src/lib/libcrypto/rand/rand_lib.c | |||
@@ -57,7 +57,6 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <sys/types.h> | ||
61 | #include <time.h> | 60 | #include <time.h> |
62 | #include <openssl/rand.h> | 61 | #include <openssl/rand.h> |
63 | 62 | ||
@@ -90,9 +89,22 @@ void RAND_seed(const void *buf, int num) | |||
90 | rand_meth->seed(buf,num); | 89 | rand_meth->seed(buf,num); |
91 | } | 90 | } |
92 | 91 | ||
93 | void RAND_bytes(unsigned char *buf, int num) | 92 | void RAND_add(const void *buf, int num, double entropy) |
94 | { | 93 | { |
95 | if (rand_meth != NULL) | 94 | if (rand_meth != NULL) |
96 | rand_meth->bytes(buf,num); | 95 | rand_meth->add(buf,num,entropy); |
97 | } | 96 | } |
98 | 97 | ||
98 | int RAND_bytes(unsigned char *buf, int num) | ||
99 | { | ||
100 | if (rand_meth != NULL) | ||
101 | return rand_meth->bytes(buf,num); | ||
102 | return(-1); | ||
103 | } | ||
104 | |||
105 | int RAND_pseudo_bytes(unsigned char *buf, int num) | ||
106 | { | ||
107 | if (rand_meth != NULL) | ||
108 | return rand_meth->pseudorand(buf,num); | ||
109 | return(-1); | ||
110 | } | ||