Skip to content

Commit c2f6b5d

Browse files
committed
tn5250: don't reference SSLv2/v3 functions if openssl is built without them
Fixes: http://autobuild.buildroot.net/results/83e/83e29482cad6adef18a0e97bc8e75df302467dbb/ The recent openssl security bump disabled SSLv2 support, but tn5250 was still referencing SSLv2 functions breaking the build. Include a patch from OpenBSD to only reference the SSLv2 / SSLv3 symbols if openssl is built with support for them. Signed-off-by: Peter Korsgaard <[email protected]>
1 parent aa016cd commit c2f6b5d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
$OpenBSD: patch-lib5250_sslstream_c,v 1.1 2015/10/07 16:09:04 jca Exp $
2+
3+
Allow building against OpenSSL without SSLv2/SSLv3 support.
4+
5+
Download from:
6+
http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/net/tn5250/patches/patch-lib5250_sslstream_c
7+
8+
Signed-off-by: Peter Korsgaard <[email protected]>
9+
--- a/lib5250/sslstream.c.orig Fri Nov 21 09:12:21 2008
10+
+++ b/lib5250/sslstream.c Tue Oct 6 21:32:29 2015
11+
@@ -368,13 +368,19 @@ int tn5250_ssl_stream_init (Tn5250Stream *This)
12+
methstr[4] = '\0';
13+
}
14+
15+
+#ifndef OPENSSL_NO_SSL2
16+
if (!strcmp(methstr, "ssl2")) {
17+
meth = SSLv2_client_method();
18+
TN5250_LOG(("SSL Method = SSLv2_client_method()\n"));
19+
- } else if (!strcmp(methstr, "ssl3")) {
20+
+ } else
21+
+#endif
22+
+#ifndef OPENSSL_NO_SSL3
23+
+ if (!strcmp(methstr, "ssl3")) {
24+
meth = SSLv3_client_method();
25+
TN5250_LOG(("SSL Method = SSLv3_client_method()\n"));
26+
- } else {
27+
+ } else
28+
+#endif
29+
+ {
30+
meth = SSLv23_client_method();
31+
TN5250_LOG(("SSL Method = SSLv23_client_method()\n"));
32+
}

0 commit comments

Comments
 (0)