Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto/boring: build constraints exclude all Go files #59

Closed
dbenoit17 opened this issue Oct 27, 2022 · 1 comment
Closed

crypto/boring: build constraints exclude all Go files #59

dbenoit17 opened this issue Oct 27, 2022 · 1 comment

Comments

@dbenoit17
Copy link
Collaborator

dbenoit17 commented Oct 27, 2022

The following program:

package main
import (
    "fmt"
    "crypto/boring"
)

func main() {
    fmt.Println("boring enabled:", boring.Enabled())
}

Produces the error

imports crypto/boring: build constraints exclude all Go files in /usr/lib/golang/src/crypto/boring

This is due to the public API missing the build tag change to !no_openssl. However, the curious thing is that running with -tags="boringcrypto" does not resolve the issue. @derekparker any thoughts?

@derekparker
Copy link
Contributor

We can work around this by prefixing GOEXPERIMENT=boringcrypto to the go build command.

@dbenoit17 dbenoit17 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2022
gitlab-runner-bot pushed a commit to gitlabhq/gitlab-runner that referenced this issue Mar 6, 2023
* Install go "manually" from tarball in ci go-fips container. We need go
  1.19 to install go-fips 1.19, and the image only has 1.18.
* Specify `GOEXPERIMENT=boringcrypto` when building the fips version of
  runner. As @stanhu mentions, this is necessary because of
  https://github.com/golang/go/blob/dev.boringcrypto/README.boringcrypto.md

See:
* golang/go#51940
* golang-fips/go#59
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

No branches or pull requests

2 participants