]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.12] all: base64-encode binaries that will cause Apple notarizatio...
authorAndrew <andybons@golang.org>
Wed, 20 Nov 2019 17:06:51 +0000 (12:06 -0500)
committerAndrew Bonventre <andybons@golang.org>
Thu, 21 Nov 2019 17:36:20 +0000 (17:36 +0000)
commita106f55360744cdaf41edc5f3e265dedf7bbf566
tree9e867e93e3e7539995b947150618dd0a8f5d4703
parenta8528068d581fcd110d0cb4f3c04ad77261abf6d
[release-branch.go1.12] all: base64-encode binaries that will cause Apple notarization to fail

Starting with macOS 10.15 (Catalina), Apple now requires all software
distributed outside of the App Store to be notarized. Any binaries we
distribute must abide by a strict set of requirements like code-signing
and having a minimum target SDK of 10.9 (amongst others).

Apple’s notarization service will recursively inspect archives looking to
find notarization candidate binaries. If it finds a binary that does not
meet the requirements or is unable to decompress an archive, it will
reject the entire distribution. From cursory testing, it seems that the
service uses content sniffing to determine file types, so changing
the file extension will not work.

There are some binaries and archives included in our distribution that
are being detected by Apple’s service as potential candidates for
notarization or decompression. As these are files used by tests and some
are intentionally invalid, we don’t intend to ever make them compliant.

As a workaround for this, we base64-encode any binaries or archives that
Apple’s notarization service issues a warning for, as these warnings will
become errors in January 2020.

Updates #34986
Updates #35747

Change-Id: I106fbb6227b61eb221755568f047ee11103c1680
Reviewed-on: https://go-review.googlesource.com/c/go/+/208118
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 8bbfc51d9ac9ce9472e126cc3654c9a45eceb236)
Reviewed-on: https://go-review.googlesource.com/c/go/+/208220
Reviewed-by: Alexander Rakoczy <alex@golang.org>
35 files changed:
src/archive/zip/reader_test.go
src/archive/zip/testdata/go-no-datadesc-sig.zip [deleted file]
src/archive/zip/testdata/go-no-datadesc-sig.zip.base64 [new file with mode: 0644]
src/cmd/internal/buildid/buildid_test.go
src/cmd/internal/buildid/testdata/a.elf [deleted file]
src/cmd/internal/buildid/testdata/a.elf.base64 [new file with mode: 0644]
src/cmd/internal/buildid/testdata/a.macho [deleted file]
src/cmd/internal/buildid/testdata/a.macho.base64 [new file with mode: 0644]
src/cmd/internal/buildid/testdata/a.pe [deleted file]
src/cmd/internal/buildid/testdata/a.pe.base64 [new file with mode: 0644]
src/cmd/internal/buildid/testdata/p.a [deleted file]
src/cmd/internal/buildid/testdata/p.a.base64 [new file with mode: 0644]
src/cmd/nm/nm_test.go
src/compress/gzip/gunzip_test.go
src/compress/gzip/testdata/issue6550.gz [deleted file]
src/compress/gzip/testdata/issue6550.gz.base64 [new file with mode: 0644]
src/debug/macho/file_test.go
src/debug/macho/testdata/clang-386-darwin-exec-with-rpath [deleted file]
src/debug/macho/testdata/clang-386-darwin-exec-with-rpath.base64 [new file with mode: 0644]
src/debug/macho/testdata/clang-386-darwin.obj [deleted file]
src/debug/macho/testdata/clang-386-darwin.obj.base64 [new file with mode: 0644]
src/debug/macho/testdata/clang-amd64-darwin-exec-with-rpath [deleted file]
src/debug/macho/testdata/clang-amd64-darwin-exec-with-rpath.base64 [new file with mode: 0644]
src/debug/macho/testdata/clang-amd64-darwin.obj [deleted file]
src/debug/macho/testdata/clang-amd64-darwin.obj.base64 [new file with mode: 0644]
src/debug/macho/testdata/fat-gcc-386-amd64-darwin-exec [deleted file]
src/debug/macho/testdata/fat-gcc-386-amd64-darwin-exec.base64 [new file with mode: 0644]
src/debug/macho/testdata/gcc-386-darwin-exec [deleted file]
src/debug/macho/testdata/gcc-386-darwin-exec.base64 [new file with mode: 0644]
src/debug/macho/testdata/gcc-amd64-darwin-exec [deleted file]
src/debug/macho/testdata/gcc-amd64-darwin-exec-debug [deleted file]
src/debug/macho/testdata/gcc-amd64-darwin-exec-debug.base64 [new file with mode: 0644]
src/debug/macho/testdata/gcc-amd64-darwin-exec.base64 [new file with mode: 0644]
src/go/build/deps_test.go
src/internal/obscuretestdata/obscuretestdata.go [new file with mode: 0644]