]> Cypherpunks repositories - gostls13.git/commit
crypto/rand: use the getentropy syscall on OpenBSD
authorMichael McConville <momcconville@gmail.com>
Sun, 3 Jan 2016 01:50:57 +0000 (20:50 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 26 Feb 2016 19:58:09 +0000 (19:58 +0000)
commitddfe7b3dc00291862f33224b68ffdad0ef4001ab
tree35aae10288d911acf65b366580a48059510f2433
parentee177279a00398d7a986fbaa1db527845c6a888b
crypto/rand: use the getentropy syscall on OpenBSD

Go already supports Linux's getrandom, which is a slightly modified
version of getentropy.

getentropy was added in OpenBSD 5.6. All supported versions of OpenBSD
include it so, unlike with Linux and getrandom, we don't need to test
for its presence.

Fixes #13785.

Change-Id: Ib536b96675f257cd8c5de1e3a36165e15c9abac9
Reviewed-on: https://go-review.googlesource.com/18219
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/crypto/rand/rand.go
src/crypto/rand/rand_openbsd.go [new file with mode: 0644]
src/internal/syscall/unix/getentropy_openbsd.go [new file with mode: 0644]