aboutsummaryrefslogtreecommitdiff
path: root/src/crypto
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2024-11-14 08:26:32 +0100
committerGopher Robot <gobot@golang.org>2024-11-15 15:49:36 +0000
commitad6bc88e07212f74fa8445233fc0fe4358d1776e (patch)
treefad74f0a3e4484836b378828e03664eedd1c8494 /src/crypto
parent534551d55a8adff53a506a8fcea387c3ade346f6 (diff)
downloadgo-ad6bc88e07212f74fa8445233fc0fe4358d1776e.tar.xz
crypto/internal/fips: make linknames path-independent
When using a FIPS140 snapshot, the import paths will have FIPS version numbers in them, so use explicit import paths for coordination with package runtime, which expects crypto/internal/fips, not (say) crypto/internal/fips/v1.1. Change-Id: I3ac48c84810493152e039eaa5f44d7cfe13d35f9 Reviewed-on: https://go-review.googlesource.com/c/go/+/627915 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Filippo Valsorda <filippo@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/internal/fips/cast.go2
-rw-r--r--src/crypto/internal/fips/indicator.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/crypto/internal/fips/cast.go b/src/crypto/internal/fips/cast.go
index f203a82c56..3e73f27dae 100644
--- a/src/crypto/internal/fips/cast.go
+++ b/src/crypto/internal/fips/cast.go
@@ -13,7 +13,7 @@ import (
// fatal is [runtime.fatal], pushed via linkname.
//
-//go:linkname fatal
+//go:linkname fatal crypto/internal/fips.fatal
func fatal(string)
// failfipscast is a GODEBUG key allowing simulation of a Cryptographic Algorithm
diff --git a/src/crypto/internal/fips/indicator.go b/src/crypto/internal/fips/indicator.go
index 538531d143..9e4f3c7845 100644
--- a/src/crypto/internal/fips/indicator.go
+++ b/src/crypto/internal/fips/indicator.go
@@ -16,10 +16,10 @@ import _ "unsafe" // for go:linkname
// negative. Finally, we expose indicatorUnset as negative to the user, so that
// we don't need to explicitly annotate fully non-approved services.
-//go:linkname getIndicator
+//go:linkname getIndicator crypto/internal/fips.getIndicator
func getIndicator() uint8
-//go:linkname setIndicator
+//go:linkname setIndicator crypto/internal/fips.setIndicator
func setIndicator(uint8)
const (