Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Indirection vars so tests can drive every branch without controlling the Go toolchain. Production paths read crypto/fips140.Enabled / Enforced / Version; tests swap the function pointer.
var BuildSetting = func(key string) string { info, ok := debug.ReadBuildInfo() if !ok { return "" } for _, s := range info.Settings { if s.Key == key { return s.Value } } return "" }
BuildSetting walks runtime/debug.ReadBuildInfo().Settings and returns the value for the given key (or "" when ReadBuildInfo fails or key is absent). Used to surface DefaultGODEBUG and GOFIPS140.
var GODEBUGRaw = func() string { return os.Getenv("GODEBUG") }
GODEBUGRaw returns the raw GODEBUG env var. Indirection seam so the FIPS info dump can distinguish GODEBUG unset from fips140=on.
Functions ¶
func PrintInfo ¶
PrintInfo writes a human-readable FIPS build + runtime posture dump to w. Surfaces every field a customer or auditor would otherwise retrieve via `go version -m <binary>` (which requires a local Go toolchain) plus the live crypto/fips140 introspection.
Output is line-oriented `key: value` so tests can grep without a parser.
Types ¶
This section is empty.