Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Unified Diff: net/cert/internal/verify_certificate_chain.cc

Issue 2813043002: Add tests for keyUsage to the built-in cert verifier. (Closed)
Patch Set: rebase and add test files for ios Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/cert/internal/verify_certificate_chain.cc
diff --git a/net/cert/internal/verify_certificate_chain.cc b/net/cert/internal/verify_certificate_chain.cc
index 5f2b7d81bd79a87aec372bf13f2c1dbfb7967c87..9a1f6e008401812c794b9515943f2fcb8db40413 100644
--- a/net/cert/internal/verify_certificate_chain.cc
+++ b/net/cert/internal/verify_certificate_chain.cc
@@ -64,14 +64,15 @@ DEFINE_CERT_ERROR_ID(kEkuLacksClientAuth,
bool IsHandledCriticalExtensionOid(const der::Input& oid) {
if (oid == BasicConstraintsOid())
return true;
+ // Key Usage is NOT processed for end-entity certificates (this is the
+ // responsibility of callers), however it is considered "handled" here in
+ // order to allow being marked as critical.
if (oid == KeyUsageOid())
return true;
if (oid == ExtKeyUsageOid())
return true;
if (oid == NameConstraintsOid())
return true;
- // TODO(eroman): SubjectAltName isn't actually used here, but rather is being
- // checked by a higher layer.
if (oid == SubjectAltNameOid())
return true;
@@ -607,8 +608,6 @@ void VerifyCertificateChainNoReturnValue(
&name_constraints_list, cert_errors);
} else {
WrapUp(cert, cert_errors);
- // TODO(eroman): Verify the Key Usage on target is consistent with
- // key_purpose.
}
}
« no previous file with comments | « net/cert/internal/verify_certificate_chain.h ('k') | net/cert/internal/verify_certificate_chain_typed_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698