aboutsummaryrefslogtreecommitdiff
path: root/src/go.sum
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-11-29 13:33:37 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-12-05 12:36:42 +0000
commitbe9379f8a8e2bfd924966020d177552d01833fdb (patch)
treedb23482d49a7ea01f4436d97d13f9bb4fc0c5c77 /src/go.sum
parent4de4480dc34fbe4f7b0ed97eada26aef7a7e2337 (diff)
downloadgo-be9379f8a8e2bfd924966020d177552d01833fdb.tar.gz
go-be9379f8a8e2bfd924966020d177552d01833fdb.zip
syscall: correct CertOpenStore to expect a 0 return value on failure
According to [1], this function returns NULL when it errors, rather than INVALID_HANDLE_VALUE, which other Win32 functions return. This was pointed out in CL 273446 for the x/sys package, and this patch here cleans it up for the syscall package and updates the vendored x/sys package using the usual `go get/go mod vendor` dance. The function is currently in use by crypto/x509/root_windows.go, which calls CertOpenStore(CERT_STORE_PROV_MEMORY), which I assume can fail under OOM or other weird conditions. Quick reversing indicates that [1] is correct, as there's a `xor eax, eax` in the error paths of the function just before jumping to the epilogue. [1] https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-certopenstore#return-value Change-Id: I77c0b0319c13313212f8710785252c494da56ed5 Reviewed-on: https://go-review.googlesource.com/c/go/+/273827 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org> Trust: Jason A. Donenfeld <Jason@zx2c4.com> Trust: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/go.sum')
-rw-r--r--src/go.sum4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/go.sum b/src/go.sum
index 3f0270fb9a..913e6ea68d 100644
--- a/src/go.sum
+++ b/src/go.sum
@@ -8,8 +8,8 @@ golang.org/x/net v0.0.0-20201029221708-28c70e62bb1d/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201110211018-35f3e6cf4a65 h1:Qo9oJ566/Sq7N4hrGftVXs8GI2CXBCuOd4S2wHE/e0M=
-golang.org/x/sys v0.0.0-20201110211018-35f3e6cf4a65/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201204225414-ed752295db88 h1:KmZPnMocC93w341XZp26yTJg8Za7lhb2KhkYmixoeso=
+golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=