aboutsummaryrefslogtreecommitdiff
path: root/dev-tools
diff options
context:
space:
mode:
authorDavid Sommerseth2021-03-17 23:06:42 +0100
committerGert Doering2021-03-18 08:13:13 +0100
commit24596b258aa3a9c0bd79e7e7bd4753c48a435408 (patch)
tree72b5942d16bd8a514474aef7bcd2618605a67a56 /dev-tools
parent4170da0778b926cea748c319163fdcfc7c6bc445 (diff)
downloadopenvpn-24596b258aa3a9c0bd79e7e7bd4753c48a435408.zip
openvpn-24596b258aa3a9c0bd79e7e7bd4753c48a435408.tar.gz
build: Remove compat-lz4
Since 2014, the OpenVPN project has shipped an adopted LZ4 library to be enabled if no LZ4 libraries was found on the system. This was due to the LZ4 library not being available on all platforms and it was vastly better than the older LZO compression algorithm. But this was years before VORACLE and related attack vectors affecting VPN connections, where compression is considered a vulnerability. The OpenVPN project is gradually moving away from supporting compression, so shipping our own LZ4 library is no longer wanted. It will now only use the LZ4 compression libraries found on the host, and can otherwise be disabled completely with ./configure --disable-lz4. Signed-off-by: David Sommerseth <davids@openvpn.net> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20210317220642.38741-1-openvpn@sf.lists.topphemmelig.net> URL: https://www.mail-archive.com/search?l=mid&q=20210317220642.38741-1-openvpn@sf.lists.topphemmelig.net Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'dev-tools')
-rwxr-xr-xdev-tools/lz4-rebaser.sh68
1 files changed, 0 insertions, 68 deletions
diff --git a/dev-tools/lz4-rebaser.sh b/dev-tools/lz4-rebaser.sh
deleted file mode 100755
index 03debcb..0000000
--- a/dev-tools/lz4-rebaser.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/sh
-# lz4-rebaser.sh - Does the LZ4 rebase process in an automated fashion
-#
-# Copyright (C) 2017-2018 David Sommerseth <davids@openvpn.net>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-# Basic shell sanity
-set -eu
-
-# Simple argument control
-if [ $# -ne 1 ]; then
- echo "Usage: $0 <Path to upstream LZ4 source tree>"
- exit 1
-fi
-
-# Check that we have the files we need before starting the rebase
-LZ4_C="$1/lib/lz4.c"
-LZ4_H="$1/lib/lz4.h"
-if [ ! -r "$LZ4_C" -o ! -r "$LZ4_H" ]; then
- echo "Could not locate $LZ4_H and/or $LZ4_C"
- exit 1
-fi
-
-# Extract the upstream LZ4 commit base
-lz4_tag="$(git --git-dir $1/.git tag --contains HEAD)"
-lz4_commit="$(git --git-dir $1/.git rev-parse --short=20 HEAD)"
-
-# Do the rebase
-srcroot="$(git rev-parse --show-toplevel)"
-echo "* Copying upstream lz4.h to compat-lz4.h"
-cp "$LZ4_H" "${srcroot}/src/compat/compat-lz4.h"
-
-echo "* Porting upstream lz4.c to compat-lz4.c"
-{
- cat <<EOF
-/* This file has been backported by $0
- * from upstream lz4 commit $lz4_commit ($lz4_tag)
- */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#elif defined(_MSC_VER)
-#include "config-msvc.h"
-#endif
-
-#ifdef NEED_COMPAT_LZ4
-EOF
- sed 's/\"lz4\.h\"/\"compat-lz4.h"/' "$LZ4_C"
-cat <<EOF
-#endif /* NEED_COMPAT_LZ4 */
-EOF
-} > "${srcroot}/src/compat/compat-lz4.c"
-
-echo "* Running 'git add'"
-git add src/compat/compat-lz4.[ch]