Source File
fips140.go
Belonging Package
crypto/fips140
// Copyright 2024 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.package fips140import ()// Enabled reports whether the cryptography libraries are operating in FIPS// 140-3 mode.//// It can be controlled at runtime using the GODEBUG setting "fips140". If set// to "on", FIPS 140-3 mode is enabled. If set to "only", non-approved// cryptography functions will additionally return errors or panic.//// This can't be changed after the program has started.func () bool {if fips140.Enabled && !check.Verified {panic("crypto/fips140: FIPS 140-3 mode enabled, but integrity check didn't pass")}return fips140.Enabled}// Version returns the FIPS 140-3 Go Cryptographic Module version (such as// "v1.0.0"), as referenced in the Security Policy for the module, if building// against a frozen module with GOFIPS140. Otherwise, it returns "latest". If an// alias is in use (such as "inprogress") the actual resolved version is// returned.//// The returned version may not uniquely identify the frozen module which was// used to build the program, if there are multiple copies of the frozen module// at the same version. The uniquely identifying version suffix can be found by// checking the value of the GOFIPS140 setting in// runtime/debug.BuildInfo.Settings.func () string {return fips140.Version()}
![]() |
The pages are generated with Golds v0.8.3-preview. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |