]> Cypherpunks.ru repositories - gostls13.git/commit
crypto/rand,runtime: switch RtlGenRandom for ProcessPrng
authorRoland Shoemaker <roland@golang.org>
Wed, 18 Oct 2023 15:25:08 +0000 (11:25 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 20 Oct 2023 18:35:47 +0000 (18:35 +0000)
commit693def151adff1af707d82d28f55dba81ceb08e1
treea33eb2b6daccbe1b74008edcc9cf63bd1b0b8961
parent3de6033d0e8022dffee85bd9537f90b1a5ba5e30
crypto/rand,runtime: switch RtlGenRandom for ProcessPrng

RtlGenRandom is a semi-undocumented API, also known as
SystemFunction036, which we use to generate random data on Windows.
It's definition, in cryptbase.dll, is an opaque wrapper for the
documented API ProcessPrng. Instead of using RtlGenRandom, switch to
using ProcessPrng, since the former is simply a wrapper for the latter,
there should be no practical change on the user side, other than a minor
change in the DLLs we load.

Change-Id: Ie6891bf97b1d47f5368cccbe92f374dba2c2672a
Reviewed-on: https://go-review.googlesource.com/c/go/+/536235
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/crypto/rand/rand.go
src/crypto/rand/rand_windows.go
src/internal/syscall/windows/syscall_windows.go
src/internal/syscall/windows/zsyscall_windows.go
src/runtime/os_windows.go