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

cert::KeyPairAlgorithm is not public #309

Open
jamesmunns opened this issue Jan 7, 2025 · 5 comments
Open

cert::KeyPairAlgorithm is not public #309

jamesmunns opened this issue Jan 7, 2025 · 5 comments

Comments

@jamesmunns
Copy link

When using rustls_cert_gen as a library, the CertificateBuilder::signature_algorithm function takes KeyPairAlgorithm as an argument, however the cert module is private, and cert::KeyPairAlgorithm is not exported. This means that CertificateBuilder::signature_algorithm cannot be used (or only used with Default::default(), the same as not using it).

Happy to open a PR to expose this (there might be other params missing too), just wanted to check if it was intentional.

@djc
Copy link
Member

djc commented Jan 7, 2025

rustls-cert-gen is not intended as a libary interface. Are there issues with using rcgen?

@jamesmunns
Copy link
Author

I figured that it was published as a lib, that I could use it as such :)

I'm sure I could copy and paste your code from that project and use rcgen and that would work fine.

@djc
Copy link
Member

djc commented Jan 7, 2025

I'd rather add high-level API to rcgen where it is currently too clunky than support library API for the CLI crate.

@jamesmunns
Copy link
Author

I mentioned it in the other issue, but https://github.com/OneVariable/rustls-self-signed-demo is what I came up with. I think having something like CertificateBuilder (and the types used by its methods), and maybe EndEntity and Ca as part of the public interface would be nice.

@djc
Copy link
Member

djc commented Jan 7, 2025

If you'd be willing to submit a PR that moves some version of the CertificateBuilder into rcgen, that sounds like an interesting idea to me!

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

No branches or pull requests

2 participants