diff options
| author | tedu <> | 2014-04-16 03:21:29 +0000 |
|---|---|---|
| committer | tedu <> | 2014-04-16 03:21:29 +0000 |
| commit | 15831e18f08f80e932b98f6b5df01ef77e7b3155 (patch) | |
| tree | 72b65a66ebf841031093b2e13bb350671b822fcf /src/lib/libcrypto/rand/randfile.c | |
| parent | 5fb8bd02e85e6249f90500e7da3ad8b2b7c989ee (diff) | |
| download | openbsd-15831e18f08f80e932b98f6b5df01ef77e7b3155.tar.gz openbsd-15831e18f08f80e932b98f6b5df01ef77e7b3155.tar.bz2 openbsd-15831e18f08f80e932b98f6b5df01ef77e7b3155.zip | |
API compat fix. RAND_load_file can never fail now. discovered and ok beck.
Diffstat (limited to 'src/lib/libcrypto/rand/randfile.c')
| -rw-r--r-- | src/lib/libcrypto/rand/randfile.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/libcrypto/rand/randfile.c b/src/lib/libcrypto/rand/randfile.c index 2cacebcf07..9ba103369f 100644 --- a/src/lib/libcrypto/rand/randfile.c +++ b/src/lib/libcrypto/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 | { |
