diff options
Diffstat (limited to 'testing/prayer/libressl.patch')
-rw-r--r-- | testing/prayer/libressl.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/testing/prayer/libressl.patch b/testing/prayer/libressl.patch new file mode 100644 index 0000000000..495b556143 --- /dev/null +++ b/testing/prayer/libressl.patch @@ -0,0 +1,40 @@ +diff --git a/lib/os.c b/lib/os.c +index fa53e04..a1408ed 100644 +--- a/lib/os.c ++++ b/lib/os.c +@@ -543,6 +543,7 @@ BOOL os_random(struct ssl_config * ssl_config, void *buffer, unsigned long count + { + int fd; + ++#ifndef OPENSSL_NO_EGD + if (ssl_config->egd_socket) { + if ((fd = os_connect_unix_socket(ssl_config->egd_socket)) < 0) + return (NIL); +@@ -564,6 +565,7 @@ BOOL os_random(struct ssl_config * ssl_config, void *buffer, unsigned long count + close(fd); + return (T); + } ++#endif + + if ((fd = open("/dev/urandom", O_RDONLY)) < 0) + return (NIL); +diff --git a/lib/ssl.c b/lib/ssl.c +index 0e652c8..34b7167 100644 +--- a/lib/ssl.c ++++ b/lib/ssl.c +@@ -78,6 +78,7 @@ static void os_initialize_prng(struct ssl_config *ssl_config) + int totbytes = 0; + int bytes; + ++#ifndef OPENSSL_NO_EGD + if (ssl_config->egd_socket) { + if ((bytes = RAND_egd(ssl_config->egd_socket)) == -1) { + log_fatal("EGD Socket %s failed", ssl_config->egd_socket); +@@ -88,6 +89,7 @@ static void os_initialize_prng(struct ssl_config *ssl_config) + goto SEEDED; /* ditto */ + } + } ++#endif + + /* Try the good-old default /dev/urandom, if available */ + totbytes += add_rand_file("/dev/urandom"); |