summaryrefslogtreecommitdiffstats
path: root/package/tn5250/0002-Allow-building-against-OpenSSL-without-SSLv2_SSLv3.patch
blob: 67f0fa63a11600b49a3655fd6dbb7d608fc2531d (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
$OpenBSD: patch-lib5250_sslstream_c,v 1.1 2015/10/07 16:09:04 jca Exp $

Allow building against OpenSSL without SSLv2/SSLv3 support.

Download from:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/net/tn5250/patches/patch-lib5250_sslstream_c

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
--- a/lib5250/sslstream.c.orig	Fri Nov 21 09:12:21 2008
+++ b/lib5250/sslstream.c	Tue Oct  6 21:32:29 2015
@@ -368,13 +368,19 @@ int tn5250_ssl_stream_init (Tn5250Stream *This)
         methstr[4] = '\0';
    }
 
+#ifndef OPENSSL_NO_SSL2
    if (!strcmp(methstr, "ssl2")) {
         meth = SSLv2_client_method();         
         TN5250_LOG(("SSL Method = SSLv2_client_method()\n"));
-   } else if (!strcmp(methstr, "ssl3")) {
+   } else
+#endif
+#ifndef OPENSSL_NO_SSL3
+   if (!strcmp(methstr, "ssl3")) {
         meth = SSLv3_client_method();         
         TN5250_LOG(("SSL Method = SSLv3_client_method()\n"));
-   } else {
+   } else
+#endif
+   {
         meth = SSLv23_client_method();         
         TN5250_LOG(("SSL Method = SSLv23_client_method()\n"));
    }
OpenPOWER on IntegriCloud