]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.17] crypto/rand, internal/syscall/unix: don't use getentropy...
authorTobias Klauser <tklauser@distanz.ch>
Thu, 19 Aug 2021 14:36:38 +0000 (16:36 +0200)
committerCherry Mui <cherryyz@google.com>
Wed, 1 Sep 2021 17:08:11 +0000 (17:08 +0000)
commitc35f8a37d916b70bf70d16be93051a2e49696be3
tree4febafd5acf8847a22db69dd3b35f1e91601b9b3
parent47a57bc4f0c6a2b7ac12d4eed4ce305446654459
[release-branch.go1.17] crypto/rand, internal/syscall/unix: don't use getentropy on iOS

CL 302489 switched crypto/rand to use getentropy on darwin, however this
function is not available on iOS. Enable getentropy only on macOS and
disable it on iOS.

Fixes #47814

Change-Id: Ib7ba5d77346aee87904bb93d60cacc845f5c0089
Reviewed-on: https://go-review.googlesource.com/c/go/+/343609
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
(cherry picked from commit 700743137462471189f58ee85fe64754cd340322)
Reviewed-on: https://go-review.googlesource.com/c/go/+/343989
src/crypto/rand/rand_getentropy.go
src/internal/syscall/unix/getentropy_darwin.go