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

Support RSA-based sign algorithms #229

Closed
AJIOB opened this issue Feb 27, 2024 · 3 comments · Fixed by #230
Closed

Support RSA-based sign algorithms #229

AJIOB opened this issue Feb 27, 2024 · 3 comments · Fixed by #230

Comments

@AJIOB
Copy link

AJIOB commented Feb 27, 2024

For now, this code generates a panic with the text Cannot generate self-signed certificate: KeyGenerationUnavailable:

let mut cert_params = CertificateParams::new(subject_alt_names);
cert_params.alg = &rcgen::PKCS_RSA_SHA256;
let cert = Certificate::from_params(cert_params).expect("Cannot generate self-signed certificate");

After searching, I found that note:

rcgen/rcgen/src/key_pair.rs

Lines 104 to 109 in 3c3e984

// Ring doesn't have RSA key generation yet:
// https://github.com/briansmith/ring/issues/219
// https://github.com/briansmith/ring/pull/733
// Nor does aws-lc-rs:
// https://github.com/aws/aws-lc-rs/issues/296
SignAlgo::Rsa() => Err(Error::KeyGenerationUnavailable),

As I search for now, aws-lc-rs has RSA signing support from version 1.6.0 via PR aws/aws-lc-rs#315. Full aws-lc-rs changelog can be found here.

Can you implement the RSA sign algorithm, please? I need this specific certificate generator.

@AJIOB AJIOB changed the title Support RSA-base sign algorithms Support RSA-based sign algorithms Feb 27, 2024
@djc
Copy link
Member

djc commented Feb 27, 2024

I (as just one of the maintainers) won't be able to implement this myself, but I will review a PR if you submit one.

@AJIOB
Copy link
Author

AJIOB commented Feb 27, 2024

@cpu, do you have some time for implementing this one?

@cpu
Copy link
Member

cpu commented Feb 28, 2024

@AJIOB Looks like est31 beat me to it :-) Support is in progress: #230

@est31 est31 closed this as completed in #230 Mar 5, 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 a pull request may close this issue.

3 participants