fipsmode

package
v1.12.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2026 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package fipsmode provides a way to check if the system is running in FIPS mode.

Index

Constants

This section is empty.

Variables

View Source
var Strict = sync.OnceValue(func() bool {
	if !Enabled() {
		return false
	}

	_, err := sha1.New().Write(nil)

	strict := err != nil

	return strict
})

Strict checks if the strict FIPS mode is enabled.

Go doesn't provide a simple way to check for strict FIPS mode, so we use a side-effect of SHA-1 to fail.

Functions

func Enabled

func Enabled() bool

Enabled checks if the system is running in FIPS mode.

func StrictEnvironmentVariable

func StrictEnvironmentVariable() string

StrictEnvironmentVariable returns the environment variable that can be used to enable strict FIPS mode.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL