crypto/internal/fips: add self-test mechanism

Updates #69536

Change-Id: Ib68b0e7058221a89908fd47f255f0a983883bee8
Reviewed-on: https://go-review.googlesource.com/c/go/+/621075
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
Filippo Valsorda 2024-10-18 18:54:45 +02:00 committed by Gopher Robot
parent ff86b8b62f
commit f505d6c581
8 changed files with 256 additions and 0 deletions

View file

@ -1038,6 +1038,11 @@ func rand_fatal(s string) {
fatal(s)
}
//go:linkname fips_fatal crypto/internal/fips.fatal
func fips_fatal(s string) {
fatal(s)
}
// throw triggers a fatal error that dumps a stack trace and exits.
//
// throw should be used for runtime-internal fatal errors where Go itself,