Index: net/cert/cert_verify_proc.cc |
diff --git a/net/cert/cert_verify_proc.cc b/net/cert/cert_verify_proc.cc |
index d987e3dc04c079d67078a53df9e6a35e1161fb65..d1fef9987f209cb1c3124b473a4c53eaff3c7eb5 100644 |
--- a/net/cert/cert_verify_proc.cc |
+++ b/net/cert/cert_verify_proc.cc |
@@ -17,6 +17,7 @@ |
#include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
#include "net/cert/cert_status_flags.h" |
#include "net/cert/cert_verifier.h" |
+#include "net/cert/cert_verify_proc_whitelist.h" |
#include "net/cert/cert_verify_result.h" |
#include "net/cert/crl_set.h" |
#include "net/cert/x509_certificate.h" |
@@ -235,6 +236,12 @@ int CertVerifyProc::Verify(X509Certificate* cert, |
rv = MapCertStatusToNetError(verify_result->cert_status); |
} |
+ if (IsNonWhitelistedCertificate(*verify_result->verified_cert, |
+ verify_result->public_key_hashes)) { |
+ verify_result->cert_status |= CERT_STATUS_AUTHORITY_INVALID; |
+ rv = MapCertStatusToNetError(verify_result->cert_status); |
+ } |
+ |
// Check for weak keys in the entire verified chain. |
bool weak_key = ExaminePublicKeys(verify_result->verified_cert, |
verify_result->is_issued_by_known_root); |