diff options
author | 2000-03-19 11:07:35 +0000 | |
---|---|---|
committer | 2000-03-19 11:07:35 +0000 | |
commit | ba5406e9b35230c537ab6fcb7b2fb173a1cea3c3 (patch) | |
tree | a7183e186150526f5c72717dac37cdabf1b43e51 /lib/libcrypto/rand/rand_lib.c | |
parent | Allow environment variables on command/config lines; markk@knigma.org (diff) | |
download | wireguard-openbsd-ba5406e9b35230c537ab6fcb7b2fb173a1cea3c3.tar.xz wireguard-openbsd-ba5406e9b35230c537ab6fcb7b2fb173a1cea3c3.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 'lib/libcrypto/rand/rand_lib.c')
-rw-r--r-- | lib/libcrypto/rand/rand_lib.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/libcrypto/rand/rand_lib.c b/lib/libcrypto/rand/rand_lib.c index 34c6d5b9681..b09a300c46e 100644 --- a/lib/libcrypto/rand/rand_lib.c +++ b/lib/libcrypto/rand/rand_lib.c @@ -57,7 +57,6 @@ */ #include <stdio.h> -#include <sys/types.h> #include <time.h> #include <openssl/rand.h> @@ -90,9 +89,22 @@ void RAND_seed(const void *buf, int num) rand_meth->seed(buf,num); } -void RAND_bytes(unsigned char *buf, int num) +void RAND_add(const void *buf, int num, double entropy) { if (rand_meth != NULL) - rand_meth->bytes(buf,num); + rand_meth->add(buf,num,entropy); } +int RAND_bytes(unsigned char *buf, int num) + { + if (rand_meth != NULL) + return rand_meth->bytes(buf,num); + return(-1); + } + +int RAND_pseudo_bytes(unsigned char *buf, int num) + { + if (rand_meth != NULL) + return rand_meth->pseudorand(buf,num); + return(-1); + } |