From 0ce12e4c1a9d3aeffb4d59f262667d1f9e4d3de7 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Thu, 25 Jul 2024 15:31:26 +0200 Subject: Kernel: T6231: verify mellanox driver source by SHA1 hash --- packages/linux-kernel/build-mellanox-ofed.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'packages') diff --git a/packages/linux-kernel/build-mellanox-ofed.sh b/packages/linux-kernel/build-mellanox-ofed.sh index 0ddf084e..7418af61 100755 --- a/packages/linux-kernel/build-mellanox-ofed.sh +++ b/packages/linux-kernel/build-mellanox-ofed.sh @@ -21,6 +21,8 @@ url="https://www.mellanox.com/downloads/ofed/MLNX_OFED-24.04-0.6.6.0/MLNX_OFED_S cd ${CWD} DRIVER_FILE=$(basename ${url} | sed -e s/tar_0/tar/) +DRIVER_SHA1="003c1c022f9f6558d45750eacc0a64d06cf9cd42" + DRIVER_DIR="${DRIVER_FILE%.tgz}" DRIVER_NAME="ofed" DRIVER_PRFX="MLNX_OFED" @@ -42,6 +44,13 @@ if [ "$?" -ne "0" ]; then exit 1 fi +# Verify integrity +echo "${DRIVER_SHA1} ${DRIVER_FILE}" | sha1sum -c - +if [[ $? != 0 ]]; then + echo SHA1 checksum missmatch + exit 1 +fi + # Unpack archive if [ -d ${DRIVER_DIR} ]; then rm -rf ${DRIVER_DIR} -- cgit v1.2.3