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

Generate v3 certificates #327

Closed
martoko opened this issue Aug 28, 2021 · 5 comments
Closed

Generate v3 certificates #327

martoko opened this issue Aug 28, 2021 · 5 comments
Labels
enhancement New feature or request suggestion Suggestion for future consideration

Comments

@martoko
Copy link

martoko commented Aug 28, 2021

The rustls rust package relies on the webpki package, which does not currently support anything other than v3 certificates.
See briansmith/webpki#219

Any chance that lagrange could be made to generate v3 certificates, while we wait for v1 certificate support for for webpki?

The current workaround is to import a v3 certificate, which works just fine.

@skyjake skyjake added the enhancement New feature or request label Aug 29, 2021
@skyjake
Copy link
Owner

skyjake commented Aug 29, 2021

It's trivial to mark the generated certificates as v3. I'll apply the change.

However, X509 v3 adds a number of fields related to allowed key usage. OpenSSL docs say:

If the key usage or extended key usage extension is absent then typically usage is unrestricted.

I am currently not setting any usage flags since these are not meaningful in Gemini, but libraries meant for the web may behave otherwise. It should be tested whether this works in webpki as expected.

@skyjake
Copy link
Owner

skyjake commented Aug 29, 2021

And now that I check briansmith/webpki#219 I see that the subject alternate name is also expected, so that's another change I'll need to still make.

@martoko
Copy link
Author

martoko commented Aug 29, 2021 via email

@skyjake
Copy link
Owner

skyjake commented Aug 29, 2021

Hmm yes, I did some quick testing with v3 and subject alternative names. Maybe I didn't set the X509 extensions correctly, but at least gemini://station.martinrue.com/ failed to understand my newly generated certificate.

I'll leave it at v1 for now since no v3 features are actually being used at the moment.

@skyjake skyjake added the suggestion Suggestion for future consideration label Aug 29, 2021
@skyjake
Copy link
Owner

skyjake commented Sep 18, 2021

The decision is to keep generating v1 certificates because no features from later versions are actually needed/used.

@skyjake skyjake closed this as completed Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request suggestion Suggestion for future consideration
Projects
None yet
Development

No branches or pull requests

2 participants