diff --git a/cmd/nebula-service/fips140.go b/cmd/nebula-service/fips140.go deleted file mode 100644 index 1756b76e..00000000 --- a/cmd/nebula-service/fips140.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build fips140enforce - -package main - -import ( - "crypto/fips140" -) - -func init() { - if !fips140.Enforced() { - panic("Nebula compiled with fips140 expects FIPS140 to be enforced. Do not set GODEBUG=fips140, or if you do it must be set as GODEBUG=fips140=only") - } -} diff --git a/cmd/nebula/fips140.go b/cmd/nebula/fips140.go deleted file mode 100644 index 1756b76e..00000000 --- a/cmd/nebula/fips140.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build fips140enforce - -package main - -import ( - "crypto/fips140" -) - -func init() { - if !fips140.Enforced() { - panic("Nebula compiled with fips140 expects FIPS140 to be enforced. Do not set GODEBUG=fips140, or if you do it must be set as GODEBUG=fips140=only") - } -} diff --git a/cmd/nebula-cert/fips140.go b/noiseutil/fips140enforce.go similarity index 93% rename from cmd/nebula-cert/fips140.go rename to noiseutil/fips140enforce.go index 1756b76e..5a6bd56e 100644 --- a/cmd/nebula-cert/fips140.go +++ b/noiseutil/fips140enforce.go @@ -1,6 +1,6 @@ //go:build fips140enforce -package main +package noiseutil import ( "crypto/fips140"