Skip to content

Commit 706aa03

Browse files
Conditionall check for ms_tls13kdf build tag (#10160) (#10164)
(cherry picked from commit aae77c4) Co-authored-by: Shaunak Kashyap <[email protected]>
1 parent 1e37b36 commit 706aa03

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
@@ -742,13 +742,12 @@ func checkFIPS(t *testing.T, agentPackageRootDir string) {
742742
case "-tags":
743743
foundTags = true
744744
require.Contains(t, setting.Value, "requirefips")
745-
// the check on ms_tls13kdf is no longer needed for go >= 1.25
746-
// It should probably be conditioned to the output of `go version <binary>`
747-
// for example:
748-
// go version elastic-agent-9.2.0-SNAPSHOT-linux-x86_64/data/elastic-agent-7b3817/components/apm-server
749-
// elastic-agent-9.2.0-SNAPSHOT-linux-x86_64/data/elastic-agent-7b3817/components/apm-server: go1.25.1
750-
//
751-
// require.Contains(t, setting.Value, "ms_tls13kdf")
745+
746+
// Check if the ms_tls13kdf build tag is set only if the binary was built
747+
// with go1.24.x (see https://github.com/microsoft/go/pull/1662).
748+
if strings.HasPrefix(info.GoVersion, "go1.24") {
749+
require.Contains(t, setting.Value, "ms_tls13kdf")
750+
}
752751
continue
753752
case "GOEXPERIMENT":
754753
foundExperiment = true

0 commit comments

Comments
 (0)