]> Cypherpunks repositories - gostls13.git/commit
internal/syscall/unix: unify GetRandom implementation
authorTobias Klauser <tklauser@distanz.ch>
Wed, 10 Mar 2021 09:06:11 +0000 (10:06 +0100)
committerTobias Klauser <tobias.klauser@gmail.com>
Thu, 11 Mar 2021 08:19:31 +0000 (08:19 +0000)
commit79e3ee52f48411eb7c4edfe3daa55e2ecf7a6c61
tree91233b81d17066fb7705e6e1d163a3c785a1a62b
parent3a3b8164fdcb071955284c13cda6ee0f29fc8bd3
internal/syscall/unix: unify GetRandom implementation

The implementation of GetRandom for Linux, FreeBSD and DragonflyBSD can
be shared.

Also remove GRND_INSECURE on DragonflyBSD as pointed out by Ian in the
review of CL 269999.

Change-Id: I5bf4c1bd51ddb2ad600652a57e0bc1bafa1cf40d
Reviewed-on: https://go-review.googlesource.com/c/go/+/299133
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/internal/syscall/unix/getrandom.go [new file with mode: 0644]
src/internal/syscall/unix/getrandom_dragonfly.go
src/internal/syscall/unix/getrandom_freebsd.go
src/internal/syscall/unix/getrandom_linux.go