diff options
author | tedu <> | 2014-04-16 03:21:29 +0000 |
---|---|---|
committer | tedu <> | 2014-04-16 03:21:29 +0000 |
commit | 9639b4a2063c8edd3ceb01eabf491618ef284f4a (patch) | |
tree | 72b65a66ebf841031093b2e13bb350671b822fcf /src/lib/libssl/src | |
parent | ff266030543ef94d0a9732fa88d93791f5be3051 (diff) | |
download | openbsd-9639b4a2063c8edd3ceb01eabf491618ef284f4a.tar.gz openbsd-9639b4a2063c8edd3ceb01eabf491618ef284f4a.tar.bz2 openbsd-9639b4a2063c8edd3ceb01eabf491618ef284f4a.zip |
API compat fix. RAND_load_file can never fail now. discovered and ok beck.
Diffstat (limited to 'src/lib/libssl/src')
-rw-r--r-- | src/lib/libssl/src/crypto/rand/randfile.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/libssl/src/crypto/rand/randfile.c b/src/lib/libssl/src/crypto/rand/randfile.c index 2cacebcf07..9ba103369f 100644 --- a/src/lib/libssl/src/crypto/rand/randfile.c +++ b/src/lib/libssl/src/crypto/rand/randfile.c | |||
@@ -80,9 +80,13 @@ | |||
80 | * Entropy devices and EGD sockets are handled in rand_unix.c */ | 80 | * Entropy devices and EGD sockets are handled in rand_unix.c */ |
81 | 81 | ||
82 | int RAND_load_file(const char *file, long bytes) | 82 | int RAND_load_file(const char *file, long bytes) |
83 | { | 83 | { |
84 | return(0); | 84 | /* the "whole" file */ |
85 | } | 85 | if (bytes == -1) |
86 | return 123456; | ||
87 | else | ||
88 | return bytes; | ||
89 | } | ||
86 | 90 | ||
87 | int RAND_write_file(const char *file) | 91 | int RAND_write_file(const char *file) |
88 | { | 92 | { |