summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortedu <>2014-04-16 03:21:29 +0000
committertedu <>2014-04-16 03:21:29 +0000
commit15831e18f08f80e932b98f6b5df01ef77e7b3155 (patch)
tree72b65a66ebf841031093b2e13bb350671b822fcf /src
parent5fb8bd02e85e6249f90500e7da3ad8b2b7c989ee (diff)
downloadopenbsd-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')
-rw-r--r--src/lib/libcrypto/rand/randfile.c10
-rw-r--r--src/lib/libssl/src/crypto/rand/randfile.c10
2 files changed, 14 insertions, 6 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
82int RAND_load_file(const char *file, long bytes) 82int 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
87int RAND_write_file(const char *file) 91int RAND_write_file(const char *file)
88 { 92 {
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
82int RAND_load_file(const char *file, long bytes) 82int 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
87int RAND_write_file(const char *file) 91int RAND_write_file(const char *file)
88 { 92 {