sources: add bottlerocket-crypto-provider crate#935
Open
sky1122 wants to merge 2 commits into
Open
Conversation
d825cab to
e5af7ed
Compare
Contributor
Author
|
forced pushed to rebase to the latest and regenerated the Cargo.lock file |
ginglis13
reviewed
May 29, 2026
e5af7ed to
bae9a1b
Compare
Contributor
Author
|
force pushed to address feedback |
37c75e8 to
a2e3990
Compare
Contributor
Author
|
forced pushed to turn on fips build and correct branch. |
ginglis13
reviewed
Jun 17, 2026
ginglis13
reviewed
Jun 17, 2026
a2e3990 to
7469bb4
Compare
Add a centralized CryptoProvider crate that provides runtime FIPS detection and TLS algorithm selection for Bottlerocket Rust binaries. When the kernel FIPS flag is enabled (/proc/sys/crypto/fips_enabled = 1), the provider restricts TLS to FIPS-approved algorithms only (AES-GCM cipher suites, P-256/P-384 key exchange). On non-FIPS systems, the full algorithm set is available. Signed-off-by: Jingwei Wang <jweiw@amazon.com>
Signed-off-by: Jingwei Wang <jweiw@amazon.com>
7469bb4 to
de5e662
Compare
Contributor
Author
|
forced pushed to address feedback change |
ginglis13
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes:
Add a centralized CryptoProvider crate that provides runtime FIPS detection and TLS algorithm selection for Bottlerocket Rust binaries.
When the kernel FIPS flag is enabled (/proc/sys/crypto/fips_enabled = 1), the provider restricts TLS to FIPS-approved algorithms only (AES-GCM cipher suites, P-256/P-384 key exchange). On non-FIPS systems, the full algorithm set is available.
This crate exposes three public functions:
Testing done:
Testing with this PR and these two code chunks running on both fips/non-fips fedora host and test pass on both
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.