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

Rethink crypto/boring.Enabled() #147

Open
bdarnell opened this issue Nov 27, 2023 · 0 comments
Open

Rethink crypto/boring.Enabled() #147

bdarnell opened this issue Nov 27, 2023 · 0 comments

Comments

@bdarnell
Copy link

The crypto/boring.Enabled() function borrows its package name and the boringcrypto build tag from the standard library's boringcrypto experiment, but it's not actually compatible because the standard library has Enabled as a public constant while golang-fips changed it to be a function.

I would recommend avoiding the name crypto/boring.Enabled unless you can make it actually compatible with the standard library interface. I'd rather have this function appear under some other package name instead of piggybacking on crypto/boring. And if a build tag is necessary, it should probably be something specific to golang-fips (nothing else in the patch is build-tag restricted, although whether you use one here or not I'm going to have to wrap my call sites in a build tag to support both standard and fips toolchains).

For an example of the confusion this can cause see cockroachdb/cockroach#114709 (comment)

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

1 participant