Skip to content

Commit f4ecb06

Browse files
committed
Remove references to the ms_tls13kdf build tag
1 parent c0c0e75 commit f4ecb06

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

docs/fips.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ This toolchain must be present for local compilation.
1212

1313
As we are using micrsoft/go as a base we follow their conventions.
1414

15-
Our FIPS changes require the `requirefips` and `ms_tls13kdf` buildtags.
15+
Our FIPS changes require the `requirefips` build tag.
1616
When compiling `GOEXPERIMENT=systemcrypto` and `CGO_ENABLED=1` must be set.
1717
Additionally the `MS_GOTOOLCHAIN_TELEMETRY_ENABLED=0` env var is set to disable telemetry for [microsoft/go](https://github.com/microsoft/go).
1818

1919
The `FIPS=true` env var is used by our magefile as the FIPS toggle.
20-
This env var applies to all targets, at a minimum the `requirefips` and `ms_tls13kdf` tags will be set.
20+
This env var applies to all targets, at a minimum the `requirefips` tag will be set.
2121
For targets that compile binaries, the `GOEXPERIMENT=systemcrypto` and `CGO_ENABLED=1` env vars are set.
2222

2323
For developer conveniance, running `FIPS=true mage multipass` will provision a multipass VM with the Microsoft/go toolchain.

magefile.go

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ var (
326326
tags = append(tags, "snapshot")
327327
}
328328
if isFIPS() {
329-
tags = append(tags, "requirefips", "ms_tls13kdf")
329+
tags = append(tags, "requirefips")
330330
}
331331
return strings.Join(tags, ",")
332332
})
@@ -486,7 +486,7 @@ func (Check) Notice() {
486486
// DetectFIPSCryptoImports will do a best effort attempt to ensure that the imports list for FIPS compatible artifacts does not contain any external crypto libraries.
487487
// Specifically it will fail if the modules list contains an entry with: "crypto", "gokrb5", or "pbkdf2"
488488
func (Check) DetectFIPSCryptoImports() error {
489-
tags := []string{"requirefips", "ms_tls13kdf"}
489+
tags := []string{"requirefips"}
490490
mods, err := getModules(tags...)
491491
if err != nil {
492492
return err
@@ -514,7 +514,7 @@ func genNotice(fips bool) error {
514514
outFile := "NOTICE.txt"
515515
if fips {
516516
log.Println("Generating NOTICE-fips.txt.")
517-
tags = append(tags, "requirefips", "ms_tls13kdf")
517+
tags = append(tags, "requirefips")
518518
outFile = "NOTICE-fips.txt"
519519
} else {
520520
log.Println("Generating NOTICE.txt.")
@@ -1202,7 +1202,7 @@ func (Docker) CustomAgentImage() error {
12021202
// Unit runs unit tests.
12031203
// Produces a unit test output file, and test coverage file in the build directory.
12041204
// SNAPSHOT adds the snapshot build tag.
1205-
// FIPS adds the requirefips and ms_tls13kdf build tags.
1205+
// FIPS adds the requirefips build tag.
12061206
func (Test) Unit() error {
12071207
mg.Deps(mg.F(mkDir, "build"))
12081208
output, err := teeCommand(environMap(), "go", "test", "-tags="+getTagsString(), "-v", "-race", "-coverprofile="+filepath.Join("build", "coverage-"+runtime.GOOS+".out"), "./...")
@@ -1214,7 +1214,7 @@ func (Test) Unit() error {
12141214
// This is done because mage may have issues when running with fips140=only set.
12151215
// Produces a unit test output file, and test coverage file in the build directory.
12161216
// SNAPSHOT adds the snapshot build tag.
1217-
// FIPS adds the requirefips and ms_tls13kdf build tags.
1217+
// FIPS adds the requirefips build tag.
12181218
func (Test) UnitFIPSOnly() error {
12191219
mg.Deps(mg.F(mkDir, "build"))
12201220
env := environMap()
@@ -1226,7 +1226,7 @@ func (Test) UnitFIPSOnly() error {
12261226

12271227
// Integration provisions the integration test environment with docker compose, runs the integration tests, then destroys the environment.
12281228
// SNAPSHOT runs integration tests with the snapshot build tag.
1229-
// FIPS runs the integration tests the requirefips and ms_tls13kdf build tags.
1229+
// FIPS runs the integration tests the requirefips build tag.
12301230
func (Test) Integration() {
12311231
mg.SerialDeps(mg.F(mkDir, "build"), Test.IntegrationUp, Test.IntegrationRun, Test.IntegrationDown)
12321232
}
@@ -1240,7 +1240,7 @@ func (Test) IntegrationUp() error {
12401240
// Assumes that the integration test environment is up.
12411241
// Produces an integration test output file in the build directory.
12421242
// SNAPSHOT runs integration tests with the snapshot build tag.
1243-
// FIPS runs the integration tests the requirefips and ms_tls13kdf build tags.
1243+
// FIPS runs the integration tests the requirefips build tag.
12441244
func (Test) IntegrationRun(ctx context.Context) error {
12451245
env, err := readEnvFile(filepath.Join("dev-tools", "integration", ".env"))
12461246
if err != nil {
@@ -1592,9 +1592,6 @@ func checkFIPSBinary(path string) error {
15921592
if !strings.Contains(setting.Value, "requirefips") {
15931593
return fmt.Errorf("requirefips tag not found in %s", setting.Value)
15941594
}
1595-
if !strings.Contains(setting.Value, "ms_tls13kdf") {
1596-
return fmt.Errorf("requirefips tag not found in %s", setting.Value)
1597-
}
15981595
continue
15991596
case "GOEXPERIMENT":
16001597
foundExperiment = true
@@ -1665,15 +1662,15 @@ func (Test) JunitReport() error {
16651662

16661663
// All runs unit and integration tests and produces junit reports for all the tests.
16671664
// SNAPSHOT adds the snapshot build tag.
1668-
// FIPS adds the requirefips and ms_tls13kdf build tags.
1665+
// FIPS adds the requirefips build tag.
16691666
func (Test) All() {
16701667
mg.SerialDeps(mg.F(mkDir, "build"), Test.Unit, Test.Integration, Test.JunitReport)
16711668
}
16721669

16731670
// Benchmark runs the included benchmarks
16741671
// Produces a benchmark file in the build directory.
16751672
// SNAPSHOT adds the snapshot build tag.
1676-
// FIPS adds the requirefips and ms_tls13kdf build tags.
1673+
// FIPS adds the requirefips build tag.
16771674
// BENCHMARK_FILTER can be used to filter what benchmarks run.
16781675
// BENCHMARK_ARGS can be used to change what is being benchmarked. Default: -count=10 -benchtime=3s -benchmem.
16791676
// BENCH_BASE can be used to change the output file name.

0 commit comments

Comments
 (0)