]> Cypherpunks repositories - gostls13.git/commit
runtime: use arc4random_buf() for readRandom
authorFilippo Valsorda <filippo@golang.org>
Mon, 26 Aug 2024 17:57:43 +0000 (19:57 +0200)
committerFilippo Valsorda <filippo@golang.org>
Mon, 7 Oct 2024 15:34:53 +0000 (15:34 +0000)
commit311372c53c21740c3427f08470ed1acd1c89f81b
treea1bb85553a2e8905869ecf611adc41ca121a0a76
parent63cd5a39e9a0a01aaf174cacdd4a3997f2fd50fd
runtime: use arc4random_buf() for readRandom

readRandom doesn't matter on Linux because of startupRand, but it does
on Windows and macOS. Windows already uses the same API as crypto/rand.
Switch macOS away from the /dev/urandom read.

Updates #68278

Cq-Include-Trybots: luci.golang.try:gotip-darwin-amd64_14
Change-Id: Ie8f105e35658a6f10ff68798d14883e3b212eb3e
Reviewed-on: https://go-review.googlesource.com/c/go/+/608436
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/os_darwin.go
src/runtime/sys_darwin.go
src/runtime/sys_darwin_amd64.s
src/runtime/sys_darwin_arm64.s