log the fips140 mode and version

Requires go1.26 for fips140.Version()
This commit is contained in:
Wade Simmons
2026-04-27 16:43:35 -04:00
parent e6eeb3709b
commit fcfbec4710
4 changed files with 22 additions and 4 deletions

17
fips140.go Normal file
View File

@@ -0,0 +1,17 @@
package nebula
import (
"crypto/fips140"
"fmt"
)
func fips140version() string {
switch {
case fips140.Enforced():
return fmt.Sprintf("only,version=%s", fips140.Version())
case fips140.Enabled():
return fmt.Sprintf("on,version=%s", fips140.Version())
default:
return "off"
}
}