mirror of
https://github.com/slackhq/nebula.git
synced 2026-05-16 12:57:38 +02:00
log the fips140 mode and version
Requires go1.26 for fips140.Version()
This commit is contained in:
17
fips140.go
Normal file
17
fips140.go
Normal 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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user