diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-29 02:36:29 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-29 02:36:29 -0600 |
commit | c9717693d0ff9323a76f63f9fe9f1fb72c49aaac (patch) | |
tree | 30cde59833c6315aeaebe3ca776926483e9b79a3 /tunnel/tools | |
parent | 0fa3fe3d435e694c7818ddaca8f755a47d9745cd (diff) |
tunnel: libwg-go: check sha256 of downloaded tarball
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel/tools')
-rw-r--r-- | tunnel/tools/libwg-go/Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tunnel/tools/libwg-go/Makefile b/tunnel/tools/libwg-go/Makefile index f4abca5f..44e7c2be 100644 --- a/tunnel/tools/libwg-go/Makefile +++ b/tunnel/tools/libwg-go/Makefile @@ -21,7 +21,10 @@ export GOOS := android export CGO_ENABLED := 1 GO_VERSION := 1.14.1 -GO_TARBALL := go$(GO_VERSION).$(shell uname -s | tr '[:upper:]' '[:lower:]')-$(NDK_GO_ARCH_MAP_$(shell uname -m)).tar.gz +GO_PLATFORM := $(shell uname -s | tr '[:upper:]' '[:lower:]')-$(NDK_GO_ARCH_MAP_$(shell uname -m)) +GO_TARBALL := go$(GO_VERSION).$(GO_PLATFORM).tar.gz +GO_HASH_darwin-amd64 := 6632f9d53fd95632e431e8c34295349cca3f0a124e3a28b760ae5c42b32816e3 +GO_HASH_linux-amd64 := 2f49eb17ce8b48c680cdb166ffd7389702c0dec6effa090c324804a5cac8a7f8 default: $(DESTDIR)/libwg-go.so @@ -30,6 +33,7 @@ $(GRADLE_USER_HOME)/caches/golang/$(GO_TARBALL): flock -x "$@.lock" -c ' \ [ -f "$@" ] && exit 0; \ curl -o "$@.tmp" "https://dl.google.com/go/$(GO_TARBALL)" && \ + echo "$(GO_HASH_$(GO_PLATFORM)) $@.tmp" | sha256sum -c && \ mv "$@.tmp" "$@"' $(BUILDDIR)/go-$(GO_VERSION)/.prepared: $(GRADLE_USER_HOME)/caches/golang/$(GO_TARBALL) |