nail: fix build against OpenSSL with disabled SSLv3 3871/head
authorJo-Philipp Wich <jo@mein.io>
Wed, 18 Jan 2017 03:03:00 +0000 (04:03 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 18 Jan 2017 03:05:26 +0000 (04:05 +0100)
Extend the existing patch handling disabled SSLv2 to cover the SSLv3 case as
well in order to fix the following build error reported by the buildbot:

    openssl.o: In function `ssl_open':
    openssl.c:(.text+0xa1c): undefined reference to `SSLv3_client_method'
    collect2: error: ld returned 1 exit status

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
mail/nail/Makefile
mail/nail/patches/100-handle-openssl-without-sslv2-sslv3.patch [new file with mode: 0644]
mail/nail/patches/100-handle-openssl-without-sslv2.patch [deleted file]

index 541d203ce866d71e2e12de0c0f137c751615614b..addc0f4c6f1ab2cdb7323eeaa05f4299cf0e564e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nail
 PKG_VERSION:=12.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=BSD-2-Clause
 
 PKG_SOURCE:=heirloom-mailx_$(PKG_VERSION).orig.tar.gz
diff --git a/mail/nail/patches/100-handle-openssl-without-sslv2-sslv3.patch b/mail/nail/patches/100-handle-openssl-without-sslv2-sslv3.patch
new file mode 100644 (file)
index 0000000..793bc3d
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/openssl.c
++++ b/openssl.c
+@@ -216,11 +216,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
++              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,
diff --git a/mail/nail/patches/100-handle-openssl-without-sslv2.patch b/mail/nail/patches/100-handle-openssl-without-sslv2.patch
deleted file mode 100644 (file)
index 4352fe8..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/openssl.c
-+++ b/openssl.c
-@@ -216,9 +216,12 @@ 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
-+              if (equal(cp, "ssl3"))
-                       method = SSLv3_client_method();
-               else if (equal(cp, "tls1"))
-                       method = TLSv1_client_method();