aboutsummaryrefslogtreecommitdiffstats
path: root/testing/prayer/libressl.patch
blob: 495b556143914a24982d0cdfadf83156a86f812e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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");