Skip to content

Commit aae77c4

Browse files
authored
Conditionall check for ms_tls13kdf build tag (#10160)
1 parent aea8133 commit aae77c4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

dev-tools/packaging/testing/package_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -844,13 +844,12 @@ func checkFIPS(t *testing.T, agentPackageRootDir string) {
844844
case "-tags":
845845
foundTags = true
846846
require.Contains(t, setting.Value, "requirefips")
847-
// the check on ms_tls13kdf is no longer needed for go >= 1.25
848-
// It should probably be conditioned to the output of `go version <binary>`
849-
// for example:
850-
// go version elastic-agent-9.2.0-SNAPSHOT-linux-x86_64/data/elastic-agent-7b3817/components/apm-server
851-
// elastic-agent-9.2.0-SNAPSHOT-linux-x86_64/data/elastic-agent-7b3817/components/apm-server: go1.25.1
852-
//
853-
// require.Contains(t, setting.Value, "ms_tls13kdf")
847+
848+
// Check if the ms_tls13kdf build tag is set only if the binary was built
849+
// with go1.24.x (see https://github.com/microsoft/go/pull/1662).
850+
if strings.HasPrefix(info.GoVersion, "go1.24") {
851+
require.Contains(t, setting.Value, "ms_tls13kdf")
852+
}
854853
continue
855854
case "GOEXPERIMENT":
856855
foundExperiment = true

0 commit comments

Comments
 (0)