aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo@golang.org>2024-11-04 12:56:04 +0100
committerGopher Robot <gobot@golang.org>2024-11-19 00:29:28 +0000
commit644628536f248cf3d5c977ed49abe51243d69ae6 (patch)
treef5a6ebcb021bcd184954b6c7232db341748605f5 /src/runtime
parentf705cf8f96bef3f61ba65e62b0b9123d718d0d12 (diff)
downloadgo-644628536f248cf3d5c977ed49abe51243d69ae6.tar.xz
crypto/rand: move OS interaction to crypto/internal/sysrand
We're going to use that package as the passive entropy source for the FIPS module, and we need to import it from a package that will be imported by crypto/rand. Since there is no overridable Reader now, introduced a mechanism to test the otherwise impossible failure of the OS entropy source. For #69536 Change-Id: I558687ed1ec896dba05b99b937970bb809de3fe7 Reviewed-on: https://go-review.googlesource.com/c/go/+/624976 Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> Reviewed-by: Roland Shoemaker <roland@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/panic.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/panic.go b/src/runtime/panic.go
index 7447854989..8e8ee8559a 100644
--- a/src/runtime/panic.go
+++ b/src/runtime/panic.go
@@ -1038,6 +1038,11 @@ func rand_fatal(s string) {
fatal(s)
}
+//go:linkname sysrand_fatal crypto/internal/sysrand.fatal
+func sysrand_fatal(s string) {
+ fatal(s)
+}
+
//go:linkname fips_fatal crypto/internal/fips.fatal
func fips_fatal(s string) {
fatal(s)