Skip to content

Commit ad6bc88

Browse files
rscgopherbot
authored andcommitted
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 <[email protected]> Reviewed-by: Filippo Valsorda <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Russ Cox <[email protected]>
1 parent 534551d commit ad6bc88

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/crypto/internal/fips/cast.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
// fatal is [runtime.fatal], pushed via linkname.
1515
//
16-
//go:linkname fatal
16+
//go:linkname fatal crypto/internal/fips.fatal
1717
func fatal(string)
1818

1919
// failfipscast is a GODEBUG key allowing simulation of a Cryptographic Algorithm

src/crypto/internal/fips/indicator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import _ "unsafe" // for go:linkname
1616
// negative. Finally, we expose indicatorUnset as negative to the user, so that
1717
// we don't need to explicitly annotate fully non-approved services.
1818

19-
//go:linkname getIndicator
19+
//go:linkname getIndicator crypto/internal/fips.getIndicator
2020
func getIndicator() uint8
2121

22-
//go:linkname setIndicator
22+
//go:linkname setIndicator crypto/internal/fips.setIndicator
2323
func setIndicator(uint8)
2424

2525
const (

0 commit comments

Comments
 (0)