-
Notifications
You must be signed in to change notification settings - Fork 107
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
FIPS support #234
FIPS support #234
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, thank you for picking this up.
I think there are some CI tweaks that should accompany this change.
- it looks like we have an explicit CI task targetting the
aws_lc_rs
feature. I think that should probably be flipped to usering
now that the default features builds are usingaws_lc_rs
- I think we don't have any coverage for the
fips
feature option. I think it makes sense to add that, and I suspect it will break the Windows build until we also add Ninja alongsidenasm
for the Windows/FIPS combo.
There is multiple reasons why I think this is a bad idea. First, the title of the PR is wrong: we already optionally support FIPS by letting people opt-in to The PR rustls/rustls#1780 has actually given a worthwhile advantage (for rustls), better performance. When one compares different TLS implementations I think performance is way more important than when one compares different certificate generator implementations. rcgen has the luxury of being able to not be as performant, because unlike a TLS library, it's not processing all of that program's communications, so it should be less in the hot path. Second, the My goal for rcgen is not to become a C bindings crate, the goal is more ambitious, to have a working stack as fully in Rust as possible. Beyond the philosophical impacts there is also practical concerns like requiring cmake and nasm. It should be quite easy to list all the units required for compilation and then compile them using the It also hurts the image of Rust in the outside, when the first thing people read who are trying out Rust programs is instructions on how to install C build systems. Should rustup be shipping cmake now? This hurts especially when it comes to defaults of fundamental crates (like rustls) because most people are not turning off default features. So I think we should just close this and revisit it only once |
Hmm seems there is a PR to remove the cmake requirement: aws/aws-lc-rs#317 And there's an issue for nasm (already been linked to in the support PR): aws/aws-lc#1477 |
@BiagioFesta do you have a concrete use case for this? I'm sympathetic to @est31's concerns and think it might make sense to with ring as the default for this crate. |
I appreciate the feedback. I share the same concern about incorporating heavy C build systems as hard dependencies in a Rust project, especially since this can be particularly challenging on Windows. That's why I split up this PR into two distinct commits, as mentioned in the description itself.
However, I'm not entirely clear on this point. With this PR, we added support for From the description:
In conclusion, I don't have a concrete use case for having If you agree, we can remove e3529f5 from this PR. What about FIPS, tho? I still think that's something useful to have as an opt-in feature. And concrete examples here trivial to explain. |
Oh yeah the I was more concerned about the second commit. Also, could you remove the lockfile changes, they look like a |
Did this in aws/aws-lc-rs#235. |
Is there something else we need to add to the CI? |
Thanks for the PR @BiagioFesta ! |
Following the same direction of
rustls
, from the latest version (0.23.0):This PR is composed by 2 commits:
fips
feature to enableaws_lc_rs/fips
ring
toaws_lc_rs