Skip to content

Conversation

@sky1122
Copy link
Contributor

@sky1122 sky1122 commented Dec 22, 2025

Issue number:

Description of changes:

This is the minimal change for switching boringcrypto to runtime GODEBUG=fips140=only. Will remove the patch and gofips wrapper etc in a separate PR and release.

FIPS compliance is now controlled at runtime via GODEBUG=fips140=only environment variable rather than compile-time GOEXPERIMENT=boringcrypto.

Testing done:
Testing with PR1, below showing the gofips point to regular go build.

bash-5.1# grep -ao "GOEXPERIMENT=boringcrypto" /usr/fips/bin/aws-iam-authenticator
GOEXPERIMENT=boringcrypto
GOEXPERIMENT=boringcrypto
GOEXPERIMENT=boringcrypto
GOEXPERIMENT=boringcrypto
bash-5.1# exit
exit
[root@admin]# apiclient get os
{
  "os": {
    "arch": "x86_64",
    "build_id": "2f4223e5",
    "pretty_name": "Bottlerocket OS 1.45.0 (aws-k8s-1.33-fips)",
    "variant_id": "aws-k8s-1.33-fips",
    "version_id": "1.45.0"
  }
}
[root@admin]# apiclient get os
{
  "os": {
    "arch": "x86_64",
    "build_id": "b7ac6e1a-dirty",
    "pretty_name": "Bottlerocket OS 1.52.0 (aws-k8s-1.33-fips)",
    "variant_id": "aws-k8s-1.33-fips",
    "version_id": "1.52.0"
  }
}
[root@admin]# sheltie
bash-5.1# grep -ao "GOEXPERIMENT=boringcrypto" /usr/fips/bin/aws-iam-authenticator
bash-5.1#

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

- Removes AWS-LC syso file integration from Go toolchains
- Updates gofips wrapper to use standard go (no GOEXPERIMENT)
- Removes Go binary checks from check-fips macro (Rust only now)
- Simplifies musl Go tree creation (no syso file shuffling)

FIPS compliance is now controlled at runtime via GODEBUG=fips140=only
environment variable rather than compile-time GOEXPERIMENT=boringcrypto.

Signed-off-by: Jingwei Wang <[email protected]>
COPY --from=sdk-go-1.25-aws-lc-musl-aarch64 \
/home/builder/aws-lc/build/goboringcrypto_linux_arm64.syso \
/home/builder/sdk-go/src/crypto/internal/boring/syso/goboringcrypto_linux_musl_arm64.syso
# FIPS/boringcrypto disabled - skipping aws-lc syso files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments aren't necessary as they refer to code that no longer exists.

/usr/share/licenses/go-1.24/

# Create Go trees for the different glibc and musl builds of the AWS-LC syso.
# Create Go trees for musl builds (no boringcrypto syso files).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The different glibc/musl paths shouldn't be necessary any longer. They were added because the syso files end up linked against a libc and consequently have different ABIs, meaning that the Go builds in turn needed to target one or the other.

COPY --from=sdk-go-1.25-aws-lc-musl-aarch64 \
/home/builder/aws-lc/build/goboringcrypto_linux_arm64.syso \
/home/builder/sdk-go/src/crypto/internal/boring/syso/goboringcrypto_linux_musl_arm64.syso
# FIPS/boringcrypto disabled - skipping aws-lc syso files
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part of the change is incomplete - you're still building AWS-LC and patching the Go sources, you're just not including the syso in the SDK any longer.

You shouldn't end up building AWS-LC after this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants