Source file src/runtime/fipsbypass.go

     1  // Copyright 2025 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package runtime
     6  
     7  import _ "unsafe"
     8  
     9  //go:linkname fips140_setBypass crypto/fips140.setBypass
    10  func fips140_setBypass() {
    11  	getg().fipsOnlyBypass = true
    12  }
    13  
    14  //go:linkname fips140_unsetBypass crypto/fips140.unsetBypass
    15  func fips140_unsetBypass() {
    16  	getg().fipsOnlyBypass = false
    17  }
    18  
    19  //go:linkname fips140_isBypassed crypto/fips140.isBypassed
    20  func fips140_isBypassed() bool {
    21  	return getg().fipsOnlyBypass
    22  }
    23  

View as plain text