Skip to content

Add aws-lc-fips feature to allow linking the aws-lc-fips-sys crate #2424

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

skmcgrail
Copy link
Contributor

Adds the ability for users to enable the aws-lc-fips crate feature, which when enabled will utilize the aws-lc-fips-sys crate for the AWS-LC bindings. This version of AWS-LC provides bindings to AWS-LC-FIPS 3.x, which has completed FIPS validation testing by an accredited lab and has been submitted to NIST for certification.

Due to the nature of having two crate features for AWS-LC bidnings (aws-lc, and aws-lc-fips), this feature will take precedence if both features are specified due to feature unification by cargo.

if is_aws_lc {
println!("cargo:rustc-cfg=awslc");
println!("cargo:awslc=true");
let is_aws_lc = cfg!(all(feature = "aws-lc", not(feature = "aws-lc-fips")));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it'd be easier to read if this was just is_aws_lc = cfg!(feature = "aws-lc") and then below for the env var prefix just for fips first.

Comment on lines 38 to +43
#[cfg(feature = "aws-lc")]
pub use aws_lc_sys::*;

#[cfg(not(feature = "aws-lc"))]
#[cfg(feature = "aws-lc-fips")]
pub use aws_lc_fips_sys::*;

Copy link
Collaborator

Choose a reason for hiding this comment

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

This will import both, which I think is a compilation error. My impression is we wanted to support feature-unifying aws-lc with aws-lc-fips into => aws-lc-fips only, right?

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