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

Supporting x.509 v1 certificates and v3 certificates with no extensions #29

Closed
lufte opened this issue Jan 25, 2023 · 12 comments
Closed

Comments

@lufte
Copy link

lufte commented Jan 25, 2023

I wonder if it's in the interest of this fork to support these two types of certificates. The original repository already has two open pull requests to add these features:

@djc
Copy link
Member

djc commented Feb 9, 2023

What's your use case for these?

@fspreiss
Copy link
Contributor

Support for v3 certificates without extensions is actually quite important for our project, e.g., to be backward-compatible with self-signed certificates (that we generated using openssl) that are deployed in production and difficult to change.

We were waiting for briansmith/webpki#219 (which has quite a bit of support via 👍) to be resolved (via briansmith/webpki#241) for a long time now (almost 2 years), but unfortunately it hasn't happened yet. For the time being, we are working with a private fork of briansmith/webpki, but maintaining it is cumbersome and we'd be very happy to see this addressed in rustls/webpki (e.g., via briansmith/webpki#241).

@lufte
Copy link
Author

lufte commented Feb 10, 2023

I'm writing a gemini browser and I see a fair amount of servers with v1 certificates in the wild.

@djc
Copy link
Member

djc commented Mar 3, 2023

#34 has since been merged, so we now accept V3 certificates without extensions. Thanks @fspreiss!

@cpu
Copy link
Member

cpu commented Mar 3, 2023

I'm quite hesitant to see support for X509 v1 certificates and don't think there's been enough compelling evidence presented to motivate support in this crate.

Is that the only remaining aspect keeping this ticket open now that the V3 sans extensions work has landed?

@djc
Copy link
Member

djc commented Mar 3, 2023

I'm quite hesitant to see support for X509 v1 certificates

Why's that?

Is that the only remaining aspect keeping this ticket open now that the V3 sans extensions work has landed?

I think so.

@cpu
Copy link
Member

cpu commented Mar 3, 2023

Why's that?

I think it's more code surface for limited benefit. X509v3 was standardized in ~1996 and the web PKI has required V3 for over a decade. I believe remaining use-cases of V1 are largely self-signed certificates generated with poor defaults and I don't think the deployment of those certificates in 2023 is wide spread enough to merit adopting workarounds (or at least haven't been convinced of that yet).

@lufte
Copy link
Author

lufte commented Mar 3, 2023

That sounds like a fair argument. I say we're good with @fspreiss work.

@djc
Copy link
Member

djc commented Mar 3, 2023

Thanks for your gracious response, will close this.

@djc djc closed this as not planned Won't fix, can't repro, duplicate, stale Mar 3, 2023
@djc
Copy link
Member

djc commented May 17, 2023

If it turns out that for some reason V1 certificates are in widespread use in the MQTT ecosystem, perhaps we should reconsider this?

@cpu
Copy link
Member

cpu commented May 17, 2023

Do we know that they're in widespread use beyond test.mosquitto.org? It seems like an easy fix for the maintainers of that server to fix their certificate. They already have a valid certificate for the same hostname on :443 and a self-issued test PKI should be quite malleable.

@djc
Copy link
Member

djc commented May 19, 2023

I don't know -- just speculating that there might be some obscure reason some ecosystems are sticking to V1.

grooverdan added a commit to grooverdan/mariadb-server that referenced this issue Mar 5, 2024
According to rfc5280, x509v3 was standardised in June 1996.

RusTLS only accepts v3 certificates rejected the v1 default.
(ref:
rustls/webpki#29 (comment))

It seems reasonable that all client libraries can accept v3.

Thanks Austin Bonander for the suggested patch.
grooverdan added a commit to grooverdan/mariadb-server that referenced this issue Mar 5, 2024
According to rfc5280, x509v3 was standardised in June 1996.

RusTLS only accepts v3 certificates rejected the v1 default.
(ref:
rustls/webpki#29 (comment))

It seems reasonable that all client libraries can accept v3.

Thanks Austin Bonander for the suggested patch.
grooverdan added a commit to grooverdan/mariadb-server that referenced this issue Mar 6, 2024
According to rfc5280, x509v3 was standardised in June 1996.

RusTLS only accepts v3 certificates rejected the v1 default.
(ref:
rustls/webpki#29 (comment))

It seems reasonable that all client libraries can accept v3.

X509_VERSION_3 has a fixed value of 2, but isn't defined in
OpenSSL-1.1.1.

Thanks Austin Bonander for the suggested patch.
grooverdan added a commit to MariaDB/server that referenced this issue Apr 15, 2024
According to rfc5280, x509v3 was standardised in June 1996.

RusTLS only accepts v3 certificates rejected the v1 default.
(ref:
rustls/webpki#29 (comment))

It seems reasonable that all client libraries can accept v3.

X509_VERSION_3 has a fixed value of 2, but isn't defined in
OpenSSL-1.1.1.

Thanks Austin Bonander for the suggested patch.
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

4 participants