]> Cypherpunks repositories - gostls13.git/commit
crypto/internal/fips/check: add new package
authorRuss Cox <rsc@golang.org>
Tue, 5 Nov 2024 18:52:13 +0000 (13:52 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 13 Nov 2024 10:42:11 +0000 (10:42 +0000)
commitc759ea7471de5a62c88325981e8c86beab78bed8
tree6145bd4d1341d2c78fd49e1620c5bb8b3282fbb8
parent2bbc6a45121e6576554d7f5f1f568c17c4bf67dd
crypto/internal/fips/check: add new package

This package is in charge of the FIPS init-time code+data verification.

If GODEBUG=fips140=off or the empty string, then no verification
happens. Otherwise, the setting must be "on", "debug", or "only",
all of which enable verification. If the setting is "debug", successful
verification prints a message to that effect. Otherwise successful
verification is quiet.

The linker leaves special information for this package to use.
See cmd/internal/obj/fips.go and cmd/link/internal/ld/fips.go,
both submitted in earlier CLs, for details.

For #69536.

Change-Id: Ie1fe29f316db290e0bd7df0a5a09108be4779d63
Reviewed-on: https://go-review.googlesource.com/c/go/+/625998
Reviewed-by: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/crypto/internal/fips/check/check.go [new file with mode: 0644]
src/crypto/internal/fips/check/check_test.go [new file with mode: 0644]
src/crypto/internal/fips/check/checktest/asm.s [new file with mode: 0644]
src/crypto/internal/fips/check/checktest/test.go [new file with mode: 0644]
src/crypto/internal/fips/check/export_test.go [new file with mode: 0644]
src/crypto/sha256/sha256.go
src/crypto/sha256/sha256_test.go
src/go/build/deps_test.go