summaryrefslogtreecommitdiffstats
path: root/contrib/go/_std_1.26/src/runtime/fipsbypass.go
blob: 12df9c6b6a2afbe7f91ee5b1f3ec4c3ade36daea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2025 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 runtime

import _ "unsafe"

//go:linkname fips140_setBypass crypto/fips140.setBypass
func fips140_setBypass() {
	getg().fipsOnlyBypass = true
}

//go:linkname fips140_unsetBypass crypto/fips140.unsetBypass
func fips140_unsetBypass() {
	getg().fipsOnlyBypass = false
}

//go:linkname fips140_isBypassed crypto/fips140.isBypassed
func fips140_isBypassed() bool {
	return getg().fipsOnlyBypass
}