From patchwork Fri Apr 8 15:10:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 5469 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4KZhX26N6Qz3x1s for ; Fri, 8 Apr 2022 15:10:42 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4KZhX034Q9z3XN; Fri, 8 Apr 2022 15:10:40 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4KZhX02fvTz2ybk; Fri, 8 Apr 2022 15:10:40 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4KZhWz2pySz2xNS for ; Fri, 8 Apr 2022 15:10:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4KZhWy31Lkz1ly for ; Fri, 8 Apr 2022 15:10:38 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1649430638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ktK4XcblHtUSwJekg6ptRkwLFL4N3A7IysDZVXKL+Ho=; b=xbSZn98UF5D/2T0nG5pP+GKL5j0rrMV3aoSDBDt3x3SZxxte7578+jrWOXHw9xiMxCXytL tNLYK5ettdLCNYDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1649430638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ktK4XcblHtUSwJekg6ptRkwLFL4N3A7IysDZVXKL+Ho=; b=EOUIcuAsx/WSijM49WddE73J2NW0F2wK2nOb+USiQcen4JZ6zGJ9P1lZlIX9xmwJvdmp9y vm3DgDOnGt+5Yh7MtfcduZyJ7f0Zpb8opAEBvZd6Aa+icIrTPXeDKgd4X0g44d9oQh9coc o/crNV7AJyWPvs/we1AND4w5OlD4Z0bV+jvrqR1Cy3ao1SFDCD5pQW0pGGSD2gSxlJjdQm jqllXaBblJ2vkWWNVt07ErP4IFRzv2EJzvIYcVrokY+iIFPlN2GVDgzBVEy2OOA8nWVFZi 3TK4qFX6VSfTJ0WiUgWfOOkXhWv+cInG2M9jtT/wR5pkB4CTjzF6PTILxyNM2Q== Message-ID: <9a3bc372-db7a-24c2-478c-6bc481864672@ipfire.org> Date: Fri, 8 Apr 2022 15:10:37 +0000 MIME-Version: 1.0 Content-Language: en-US To: "IPFire: Development" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH 1/3] downloadsource.sh: Change checksum algorithm to BLAKE2 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Reported-by: Arne Fitzenreiter Signed-off-by: Peter Müller --- src/installer/downloadsource.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/installer/downloadsource.sh b/src/installer/downloadsource.sh index c74f9e232..47086b2b7 100644 --- a/src/installer/downloadsource.sh +++ b/src/installer/downloadsource.sh @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2010 IPFire Team # +# Copyright (C) 2007-2022 IPFire Team # # # # 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 # @@ -48,17 +48,17 @@ if ! download -O "${OUTPUT}" "${URL}"; then exit 1 fi -# Download went well. Checking for MD5 sum -if download -O "${OUTPUT}.md5" "${URL}.md5" &>/dev/null; then +# Download went well. Checking for BLAKE2 sum +if download -O "${OUTPUT}.b2" "${URL}.b2" &>/dev/null; then # Read downloaded checksum - read -r md5sum rest < "${OUTPUT}.md5" - rm -f "${OUTPUT}.md5" + read -r b2sum rest < "${OUTPUT}.b2" + rm -f "${OUTPUT}.b2" # Compute checkum of downloaded image file - read -r md5sum_image rest <<< "$(md5sum "${OUTPUT}")" + read -r b2sum_image rest <<< "$(b2sum "${OUTPUT}")" - if [ "${md5sum}" != "${md5sum_image}" ]; then - echo "MD5 sum mismatch: ${md5sum} != ${md5sum_image}" >&2 + if [ "${b2sum}" != "${b2sum_image}" ]; then + echo "BLAKE2 checksum mismatch: ${b2sum} != ${b2sum_image}" >&2 exit 2 fi fi