Skip to content

Support ECDSA_P521_SHA512 when using aws_lc_rs feature #241

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

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

Alvenix
Copy link
Contributor

@Alvenix Alvenix commented Mar 13, 2024

Hope I didn't miss anything.

Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@cpu
Copy link
Member

cpu commented Mar 13, 2024

I think the KeyPairAlgorithm enum in rustls-cert-gen could also use an update for the new alg.

@Alvenix
Copy link
Contributor Author

Alvenix commented Mar 13, 2024

I think the KeyPairAlgorithm enum in rustls-cert-gen could also use an update for the new alg.

Should I add aws_lc_rs feature to rustls-cert-gen crate?

@djc
Copy link
Member

djc commented Mar 13, 2024

I think the KeyPairAlgorithm enum in rustls-cert-gen could also use an update for the new alg.

Should I add aws_lc_rs feature to rustls-cert-gen crate?

If necessary, yes!

@cpu
Copy link
Member

cpu commented Mar 13, 2024

rustls-cert-gen was extended with RSA key gen support, which is already tied to using aws-lc-rs. Wouldn't that have required piping through the feature or did I miss something?

@est31
Copy link
Member

est31 commented Mar 14, 2024

one doesn't have to pipe features through, one can also depend on rcgen directly, or do the cargo install --features rcgen/... trick. This can download additional dependencies not present in Cargo.toml. scary, right?

@est31
Copy link
Member

est31 commented Mar 14, 2024

note that in this instance, I think it makes sense to add features to rustls-cert-gen.

@Alvenix
Copy link
Contributor Author

Alvenix commented Mar 14, 2024

I think the KeyPairAlgorithm enum in rustls-cert-gen could also use an update for the new alg.

I added it in a separate commit to ease the review, I will squash it after the review is done.

@djc djc changed the title Support ECDSA_P521_SHA512 when using aes_lc_rs feature Support ECDSA_P521_SHA512 when using aws_lc_rs feature Mar 14, 2024
Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

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

Looks okay to me modulo some nits.

Copy link
Member

@cpu cpu left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good :-)

@cpu
Copy link
Member

cpu commented Mar 15, 2024

For what it's worth I was able to use the code in this branch over in rustls/rustls#1852 👍

Copy link
Member

@est31 est31 left a comment

Choose a reason for hiding this comment

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

LGTM

@Alvenix
Copy link
Contributor Author

Alvenix commented Mar 17, 2024

I performed the requested changes, rebased to main, and squashed the two commits into a single commit.

@Alvenix
Copy link
Contributor Author

Alvenix commented Mar 17, 2024

I added additional commit for review to fix the CICD.

Mainly the failures are due rustls-cert-gen now requiring either ring or aws_lc_rs features which causes these failures.

I am not sure about the remaining failures. (if they are related to this PR and how to fix them)

@djc
Copy link
Member

djc commented Mar 18, 2024

IIRC aws-lc-rs with FIPS is only supported on Linux for now.

@cpu
Copy link
Member

cpu commented Mar 18, 2024

IIRC aws-lc-rs with FIPS is only supported on Linux for now.

Agreed. There are additional FIPS build reqs documented here that include "Linux".

ci / Clippy (-p rcgen --no-default-features) (pull_request) Failing after 4m

I think this is a true-positive finding for this branch:

error: unused import: `super::*`
    --> rcgen/src/certificate.rs:1146:6
     |
1146 |     use super::*;
     |         ^^^^^^^^
     |
     = note: `-D unused-imports` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(unused_imports)]`

@Alvenix
Copy link
Contributor Author

Alvenix commented Mar 19, 2024

I think this is a true-positive finding for this branch:

error: unused import: `super::*`
    --> rcgen/src/certificate.rs:1146:6
     |
1146 |     use super::*;
     |         ^^^^^^^^
     |
     = note: `-D unused-imports` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(unused_imports)]`

I got the same warning on the main branch of this repo. That is why I think it is unrelated. Should I fix this warning in this pull request?

@djc
Copy link
Member

djc commented Mar 19, 2024

I got the same warning on the main branch of this repo. That is why I think it is unrelated. Should I fix this warning in this pull request?

Either a separate commit in this PR or a separate PR would be great!

@cpu
Copy link
Member

cpu commented Mar 19, 2024

I got the same warning on the main branch of this repo. That is why I think it is unrelated.

Oh! My mistake, sorry about the confusion.

@cpu
Copy link
Member

cpu commented Mar 19, 2024

Is there anything holding back fixing the CI and rebasing so this could merge? I think we just need the non-Linux CI tasks to avoid the FIPS feature.

@cpu cpu mentioned this pull request Mar 19, 2024
@Alvenix Alvenix force-pushed the support_p521 branch 4 times, most recently from 76c37c4 to 9e564da Compare March 19, 2024 21:29
@Alvenix
Copy link
Contributor Author

Alvenix commented Mar 19, 2024

Is there anything holding back fixing the CI and rebasing so this could merge? I think we just need the non-Linux CI tasks to avoid the FIPS feature.

I removed FIPS step from non-Linux CI tasks.

In addition I rebased to main and squashed the two commits.

For quicker review, here is the second commit before it was squashed. These changes were made to fix the CICD.

Copy link
Member

@cpu cpu left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

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

LGTM!

@djc djc added this pull request to the merge queue Mar 20, 2024
@djc
Copy link
Member

djc commented Mar 20, 2024

Thanks for getting this in good shape!

Merged via the queue into rustls:main with commit fce1b82 Mar 20, 2024
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.

4 participants