aboutsummaryrefslogtreecommitdiffstats
path: root/community/heirloom-mailx/libressl.patch
blob: ab8696a242f703241f8ce08fbe66f7435cce7102 (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
41
42
43
diff --git a/openssl.c b/openssl.c
index b4e33fc..a7c57e7 100644
--- a/openssl.c
+++ b/openssl.c
@@ -135,6 +135,7 @@ ssl_rand_init(void)
 	char *cp;
 	int state = 0;
 
+#ifndef OPENSSL_NO_EGD
 	if ((cp = value("ssl-rand-egd")) != NULL) {
 		cp = expand(cp);
 		if (RAND_egd(cp) == -1) {
@@ -143,7 +144,9 @@ ssl_rand_init(void)
 					cp);
 		} else
 			state = 1;
-	} else if ((cp = value("ssl-rand-file")) != NULL) {
+	} else
+#endif
+	if ((cp = value("ssl-rand-file")) != NULL) {
 		cp = expand(cp);
 		if (RAND_load_file(cp, 1024) == -1) {
 			fprintf(stderr, catgets(catd, CATSET, 246,
@@ -216,11 +219,17 @@ ssl_select_method(const char *uhp)
 
 	cp = ssl_method_string(uhp);
 	if (cp != NULL) {
+#ifndef OPENSSL_NO_SSL2
 		if (equal(cp, "ssl2"))
 			method = SSLv2_client_method();
-		else if (equal(cp, "ssl3"))
+		else
+#endif
+#ifndef OPENSSL_NO_SSL3_METHOD
+		if (equal(cp, "ssl3"))
 			method = SSLv3_client_method();
-		else if (equal(cp, "tls1"))
+		else
+#endif
+		if (equal(cp, "tls1"))
 			method = TLSv1_client_method();
 		else {
 			fprintf(stderr, catgets(catd, CATSET, 244,