by est31 · 5y ago · 0 comments
Huh that's a really cool idea. I wonder how it's implemented, as it might be useful for the rustls-native-certs crate as well...
Edit: found it: Apparently there is a bool field is_issued_by_known_root that gets set by the differerent backends. https://chromium.googlesource.com/chromium/src/net/+/2f96522...
We’re taking an approach similar to Firefox’s implementation ( https://searchfox.org/mozilla-central/source/security/manage... ), which I helped advise on in the long ago days. It may end up using like that bool, but if you read through the commit history for how that code in Chrome works, you can see there are a lot of sharp edges.
It only reads in the Root CA certificates in the Machine store.
It ignores the User store entirely.
It ignores the Intermediate CA store as well.
I bet Mozilla's logic is that Intermediate CA certificates can simply be "downloaded" dynamically, but Windows Server CAs use LDAP URLs by default, which Firefox doesn't support.
It also ignores CTLs, CRLs, revoked certificates, and a bunch of other Windows PKI stores.
Chrome was pleasant to use in that "it just worked", and this was a major reason it was adopted by large organisations and Firefox wasn't.
Please don't break this.
Firefox still ignores the local Intermediate CA store, the revoked store, etc...
> because the goal is not to reimplement CAPI and it’s 200+ undocumented (except by support contract) flags and features.
The reality is that there are orgs out there with Enterprise CA Roots that have issued many intermediate CAs and tens of thousands leaf certificates.
Because of the arrogant behaviour of Mozilla and Google, it is now incredibly dangerous to run an Enterprise CA because it is no longer feasible to revoke an Intermediate CA!
Neither Firefox, nor Chrome check Intermediate CA CRLs or OCSP by default. Chrome up until recently would honour revocations via Group Policy, but Firefox would not.
Google uses CRLSets in Chrome for CA revocation, but good luck getting them to accept your Intermediate CA key that was compromised!
Now Google is going down the same selfish path: Because Google doesn't need Enteprise PKI -- because none of their products are used extensively for private networking -- they're more than happy to break hundreds of millions of deployed Windows private networks. Who cares, right? That's the competition!
"Do not be evil" was removed, remember?