rustls / rcgen

Generate X.509 certificates, CSRs
Other
346 stars 109 forks source link

fix missing export of `KeyPairAlgorithm` #273

Closed roberts-pumpurs closed 6 months ago

roberts-pumpurs commented 6 months ago

This was preventing me from using rustls-cert-gen as a library. Also re-export rcgen crate to access shared types.

djc commented 6 months ago

rustls-cert-gen is not intended for use as a library. You should use rcgen instead.

cpu commented 6 months ago

I'm going to close this for now based on our preference to discourage library use of the CLI crate.

rustls-cert-gen is not intended for use as a library.

It looks like we fell into a weird in-between here where the CLI tool is structured around a lib.rs, and some elements are pub, yet we recommend not using it as a library.

I think that recommendation is correct (it's a shame to drag in the extra deps like bpaf and anyhow for a library use-case) but perhaps we should take an action to make it seem less appealing?

@roberts-pumpurs Can you speak to whether there's something missing from rcgen-proper that made you reach for rustls-cert-gen instead?

roberts-pumpurs commented 6 months ago

No, rcgen is fine. I just liked the builder pattern on the CLI — nothing else, really. And given that it was published on crates.io and had a lib.rs that (at first glance) exported everything that I'd need, it made me want to reach for that rather than the more "low-level" regen crate.

cpu commented 6 months ago

Makes sense, I'm also a fan of the builder pattern :+1: Thanks for the reply.