deb.open-vault/helper/constants/fips_cgo_check.go

22 lines
739 B
Go
Raw Normal View History

2024-04-20 12:23:50 +00:00
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
//go:build (fips || fips_140_2 || fips_140_3) && !cgo
package constants
func init() {
// See note in fips_build_check.go.
//
// This function call is missing a declaration, causing the build to
// fail on improper tags (fips specified but cgo not specified). This
// ensures Vault fails to build if a FIPS build is requested but CGo
// support is not enabled.
//
// Note that this could confuse static analysis tools as this function
// should not ever be defined. If this function is defined in the future,
// the below reference should be renamed to a new name that is not
// defined to ensure we get a build failure.
VaultFIPSBuildTagMustEnableCGo()
}