diff options
| author | Cherry Zhang <cherryyz@google.com> | 2020-11-21 17:43:16 -0500 |
|---|---|---|
| committer | Cherry Zhang <cherryyz@google.com> | 2020-12-01 21:42:10 +0000 |
| commit | 7fca39aa05ad3c60abac1ae51ae9847dfbe017d6 (patch) | |
| tree | 961ea71633e4768bd941a775b3ef78a2072b73db /src/encoding/json | |
| parent | 7430266af4f951df3c113f2c817bc600650e2295 (diff) | |
| download | go-7fca39aa05ad3c60abac1ae51ae9847dfbe017d6.tar.xz | |
cmd/internal/buildid: exclude Mach-O code signature in hash calculation
The code signature contains hashes of the entire file (except the
signature itself), including the buildid. Therefore, the buildid
cannot depend on the signature. Otherwise updating buildid will
invalidate the signature, and vice versa. As we cannot change the
code-signing algorithm, we can only change buildid calculation.
This CL changes the buildid calculation to exclude the Mach-O
code signature. So updating code signature after stamping the
buildid will not invalidate the buildid.
Updates #38485, #42684.
Change-Id: I8a9e2e25ca9dc00d9556d13b81652f43bbf6a084
Reviewed-on: https://go-review.googlesource.com/c/go/+/272255
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/encoding/json')
0 files changed, 0 insertions, 0 deletions
