Skip to content

Commit

Permalink
verify sha256
Browse files Browse the repository at this point in the history
  • Loading branch information
git-bruh committed Aug 30, 2022
1 parent b74ffd2 commit f803a11
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eu

OPENSSL_VERSION=3.0.5
OPENSSL_VERSION="$1"
OPENSSL_SRC="https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz"

OUTDIR="$PWD/output"
Expand All @@ -14,7 +14,18 @@ mkdir -p "$OUTDIR"

cd "$TMPDIR"

curl -L "$OPENSSL_SRC" | tar xfz -
curl -L "$OPENSSL_SRC" > out.tar.gz

SHA256="$(sha256sum out.tar.gz | awk '{print $1}')"

[ "$SHA256" = "$2" ] || {
echo "sha256 '$SHA256' != '$2'"
exit 1
}

tar xf out.tar.gz
rm out.tar.gz

cd "openssl-$OPENSSL_VERSION"

# Make the generated Makefile use host toolchain
Expand Down

0 comments on commit f803a11

Please sign in to comment.