github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/crypto/internal/boring/fipstls/tls.go (about)

     1  // Copyright 2017 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  //go:build boringcrypto
     6  
     7  // Package fipstls allows control over whether crypto/tls requires FIPS-approved settings.
     8  // This package only exists with GOEXPERIMENT=boringcrypto, but the effects are independent
     9  // of the use of BoringCrypto.
    10  package fipstls
    11  
    12  // Force forces crypto/tls to restrict TLS configurations to FIPS-approved settings.
    13  // By design, this call is impossible to undo (except in tests).
    14  //
    15  // Note that this call has an effect even in programs using
    16  // standard crypto (that is, even when Enabled = false).
    17  func Force()
    18  
    19  // Abandon allows non-FIPS-approved settings.
    20  // If called from a non-test binary, it panics.
    21  func Abandon()
    22  
    23  // Required reports whether FIPS-approved settings are required.
    24  func Required() bool