Package: sslsplit
Version: 0.5.5-1
Severity: serious
Tags: patch experimental
Justification: ftbfs
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch

Hi Hilko,

The sslsplit package was failing to build in Ubuntu against openssl3,
because it uses an ERR_GET_FUNC() macro that has been obsoleted in this
release.  I have uploaded the attached patch to Ubuntu to fix the build
failure; please consider including it in Debian as well.

OpenSSL 3 is currently in experimental, and expected to be the version
shipped in the next Debian release.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru sslsplit-0.5.5/debian/patches/openssl3.patch 
sslsplit-0.5.5/debian/patches/openssl3.patch
--- sslsplit-0.5.5/debian/patches/openssl3.patch        1969-12-31 
16:00:00.000000000 -0800
+++ sslsplit-0.5.5/debian/patches/openssl3.patch        2021-12-08 
14:23:54.000000000 -0800
@@ -0,0 +1,66 @@
+Description: Compatibility with OpenSSL 3
+ ERR_GET_FUNC() no longer exists in OpenSSL 3, so drop references to it.
+Author: Steve Langasek <steve.langa...@ubuntu.com>
+Last-Update: 2021-12-08
+Forwarded: no
+
+Index: sslsplit-0.5.5/pxyconn.c
+===================================================================
+--- sslsplit-0.5.5.orig/pxyconn.c
++++ sslsplit-0.5.5/pxyconn.c
+@@ -2188,7 +2188,7 @@
+                       /* these can happen due to client cert auth,
+                        * only log error if debugging is activated */
+                       log_dbg_printf("Error from %s bufferevent: "
+-                                     "%i:%s %lu:%i:%s:%i:%s:%i:%s\n",
++                                     "%i:%s %lu:%i:%s:%i:%s:%s\n",
+                                      (bev == ctx->src.bev) ? "src" : "dst",
+                                      errno,
+                                      errno ? strerror(errno) : "-",
+@@ -2199,24 +2199,22 @@
+                                      ERR_GET_LIB(sslerr),
+                                      sslerr ?
+                                      ERR_lib_error_string(sslerr) : "-",
+-                                     ERR_GET_FUNC(sslerr),
+                                      sslerr ?
+                                      ERR_func_error_string(sslerr) : "-");
+                       while ((sslerr = bufferevent_get_openssl_error(bev))) {
+                               log_dbg_printf("Additional SSL error: "
+-                                             "%lu:%i:%s:%i:%s:%i:%s\n",
++                                             "%lu:%i:%s:%i:%s:%s\n",
+                                              sslerr,
+                                              ERR_GET_REASON(sslerr),
+                                              ERR_reason_error_string(sslerr),
+                                              ERR_GET_LIB(sslerr),
+                                              ERR_lib_error_string(sslerr),
+-                                             ERR_GET_FUNC(sslerr),
+                                              ERR_func_error_string(sslerr));
+                       }
+               } else {
+                       /* real errors */
+                       log_err_printf("Error from %s bufferevent: "
+-                                     "%i:%s %lu:%i:%s:%i:%s:%i:%s\n",
++                                     "%i:%s %lu:%i:%s:%i:%s:%s\n",
+                                      (bev == ctx->src.bev) ? "src" : "dst",
+                                      errno,
+                                      errno ? strerror(errno) : "-",
+@@ -2227,18 +2225,16 @@
+                                      ERR_GET_LIB(sslerr),
+                                      sslerr ?
+                                      ERR_lib_error_string(sslerr) : "-",
+-                                     ERR_GET_FUNC(sslerr),
+                                      sslerr ?
+                                      ERR_func_error_string(sslerr) : "-");
+                       while ((sslerr = bufferevent_get_openssl_error(bev))) {
+                               log_err_printf("Additional SSL error: "
+-                                             "%lu:%i:%s:%i:%s:%i:%s\n",
++                                             "%lu:%i:%s:%i:%s:%s\n",
+                                              sslerr,
+                                              ERR_GET_REASON(sslerr),
+                                              ERR_reason_error_string(sslerr),
+                                              ERR_GET_LIB(sslerr),
+                                              ERR_lib_error_string(sslerr),
+-                                             ERR_GET_FUNC(sslerr),
+                                              ERR_func_error_string(sslerr));
+                       }
+               }
diff -Nru sslsplit-0.5.5/debian/patches/series 
sslsplit-0.5.5/debian/patches/series
--- sslsplit-0.5.5/debian/patches/series        2019-08-31 03:41:21.000000000 
-0700
+++ sslsplit-0.5.5/debian/patches/series        2021-12-08 14:22:20.000000000 
-0800
@@ -1 +1,2 @@
 0001-Use-pkg-config-to-determine-linker-flags-for-test-pr.patch
+openssl3.patch

Reply via email to