]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.13] 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:06 +0000 (17:36 +0000)
commitabfbc0555bdef683d916dd97c1fb353c6d08bee6
tree48428a2cab734fd9685371e5cf9e3f1c8b2c8fe7
parent6219b48e11f36329de801f62f18448bb4b1cd1a5
[release-branch.go1.13] 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
Fixes #35748

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/+/208219
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]