Skip to content

Commit

Permalink
crypto/internal/fips140: mark OpenBSD unsupported
Browse files Browse the repository at this point in the history
Since OpenBSD 7.3, external linking uses -fexecute-only, which breaks
the integrity check. Since we are not validating on OpenBSD anyway,
mark it as unsupported at least for now.

Fixes golang#70880

Change-Id: I6a6a4656b6c7a97c0962b4158d920f9e6b19678e
Reviewed-on: https://go-review.googlesource.com/c/go/+/639337
Auto-Submit: Filippo Valsorda <[email protected]>
Reviewed-by: Daniel McCarney <[email protected]>
Reviewed-by: Roland Shoemaker <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Joel Sing <[email protected]>
Reviewed-by: صادق <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
FiloSottile authored and wyf9661 committed Jan 21, 2025
1 parent fe4c5f5 commit e00b30c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cmd/dist/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,7 @@ func (t *tester) fipsSupported() bool {
case goarch == "wasm",
goos == "windows" && goarch == "386",
goos == "windows" && goarch == "arm",
goos == "openbsd",
goos == "aix":
return false
}
Expand Down
1 change: 1 addition & 0 deletions src/crypto/internal/fips140/fips140.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func Supported() error {
case runtime.GOARCH == "wasm",
runtime.GOOS == "windows" && runtime.GOARCH == "386",
runtime.GOOS == "windows" && runtime.GOARCH == "arm",
runtime.GOOS == "openbsd", // due to -fexecute-only, see #70880
runtime.GOOS == "aix":
return errors.New("FIPS 140-3 mode is not supported on " + runtime.GOOS + "-" + runtime.GOARCH)
}
Expand Down

0 comments on commit e00b30c

Please sign in to comment.