From 1605604d14462ab5b66f2cf4868b1109d231cfc0 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Sat, 31 Oct 2020 00:41:07 +0100 Subject: [PATCH] Build against OpenSSL 1.1 on RHEL 7 (for TLSv1.3 support) --- dsniff-2.4-fedora_dirs.patch | 2 +- dsniff.spec | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dsniff-2.4-fedora_dirs.patch b/dsniff-2.4-fedora_dirs.patch index b500b3f..781d074 100644 --- a/dsniff-2.4-fedora_dirs.patch +++ b/dsniff-2.4-fedora_dirs.patch @@ -18,7 +18,7 @@ various paths for the Fedora directory structure. -INCS = -I. $(NIDSINC) $(PCAPINC) $(LNETINC) $(DBINC) $(SSLINC) $(X11INC) \ - -I$(srcdir)/missing -+INCS = -I. $(X11INC) -I$(srcdir)/missing ++INCS = -I. $(X11INC) $(SSLINC) -I$(srcdir)/missing LIBS = @LIBS@ -L$(srcdir) -lmissing INSTALL = @INSTALL@ diff --git a/dsniff.spec b/dsniff.spec index ea5d043..c25c638 100644 --- a/dsniff.spec +++ b/dsniff.spec @@ -41,7 +41,11 @@ Patch32: dsniff-2.4-smp_mflags.patch Patch33: dsniff-2.4-libtirpc.patch BuildRequires: gcc BuildRequires: libnet-devel +%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: openssl-devel +%else +BuildRequires: openssl11-devel +%endif BuildRequires: libnids-devel BuildRequires: glib2-devel BuildRequires: libpcap-devel @@ -106,6 +110,14 @@ by exploiting weak bindings in ad-hoc PKI. %endif %build +%if 0%{?rhel} == 7 +sed \ + -e 's|include/openssl/|include/openssl11/openssl/|g' \ + -e 's|\(SSLINC="\)-I${prefix}/include|\1$(pkg-config --cflags openssl11)|g' \ + -e 's|\(SSLLIB="\)-L${prefix}/lib -lssl -lcrypto|\1$(pkg-config --libs openssl11)|g' \ + -i configure +%endif + %configure %make_build