summaryrefslogtreecommitdiff
path: root/go
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2020-01-17 22:16:24 +0100
committercyberta <cyberta@riseup.net>2020-01-17 22:16:24 +0100
commit95bd478d62c9ebf3e313df4915c392dfd094d615 (patch)
tree448d2337027e3a0fc043047d11064e058c62c790 /go
parent701622624762faa407c610bfbac9523e840c9d6d (diff)
add golang download fingerprint verification
Diffstat (limited to 'go')
-rwxr-xr-xgo/install_go.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/go/install_go.sh b/go/install_go.sh
index ee7c5ac3..8631b456 100755
--- a/go/install_go.sh
+++ b/go/install_go.sh
@@ -1,6 +1,7 @@
#!/bin/bash
GO_VERSION=go1.12.7.linux-amd64
+EXPECTED_FP=66d83bfb5a9ede000e33c6579a91a29e6b101829ad41fffb5c5bb6c900e109d9
if [[ $(ls -A ${GO_VERSION}.tar.gz) ]]
then
@@ -8,6 +9,12 @@ then
else
echo "installing go lang bundle ${GO_VERSION}.tar.gz"
curl -o $GO_VERSION.tar.gz https://dl.google.com/go/$GO_VERSION.tar.gz
+ ACTUAL_FP=`sha256sum $GO_VERSION.tar.gz | cut -d " " -f1`
+ if [[ ! $ACTUAL_FP == $EXPECTED_FP ]]
+ then
+ echo "Download seems to be corrupted. Cancelling build."
+ return 1
+ fi
fi
if [[ -d ./golang ]]