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 parsing X509 certificates with no allocations #1603

Open
DemiMarie opened this issue Nov 3, 2024 · 2 comments
Open

Support parsing X509 certificates with no allocations #1603

DemiMarie opened this issue Nov 3, 2024 · 2 comments

Comments

@DemiMarie
Copy link

WebPKI supports this, as does my own barebones-x509 crate.

@tarcieri
Copy link
Member

tarcieri commented Nov 3, 2024

See ample related discussion in #689 for the encoding side of things.

We pretty much went in the opposite direction in #765 and leaned further into the existing hard dependency on alloc.

@tarcieri
Copy link
Member

tarcieri commented Nov 4, 2024

In some other crates, notably spki and the latest prereleases of pkcs8, we do abstract over the owned and borrowed forms using generics:

https://docs.rs/pkcs8/0.11.0-rc.1/pkcs8/struct.PrivateKeyInfo.html

This has the following forms, one of which has a lifetime and the other does not:

We could potentially do something like that with x509-cert as well, though we already use generics to carry a profile ZST, so it might become a lot of generic parameters, which makes the API more cumbersome.

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