aboutsummaryrefslogtreecommitdiffstats
path: root/community/heirloom-mailx/libressl.patch
blob: 992b576f4c58b4255cada75f396ff8614ff1ef3e (plain) (blame)
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) {
+#if !defined(OPENSSL_NO_SSL2) && OPENSSL_VERSION_NUMBER < 0x10100000L
 		if (equal(cp, "ssl2"))
 			method = SSLv2_client_method();
-		else if (equal(cp, "ssl3"))
+		else
+#endif
+#if !defined(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,