rustls / rustls-platform-verifier

A certificate verification library for rustls that uses the operating system's verifier
Apache License 2.0
57 stars 18 forks source link

Android: Don't attempt to check revocation on non-public certificates #108

Closed complexspaces closed 1 week ago

complexspaces commented 3 weeks ago

This PR fixes an issue on Android where the verifier was attempting to enforce revocation constraints even on self-signed certificates that don't (nor should need to) supply revocation information. This PR fixes this by bringing back our previous isKnownRoot check and using this to determine if we should even try the revocation codepaths. If a certificate isn't a known root, we don't let Android enforce revocation information.

A small cutout was left for cases where an explicit stapled OSCP response is provided by the server. This is for two reasons:

Closes https://github.com/rustls/rustls-platform-verifier/issues/69