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..ac243c7d25057c4eb2bca8d4320db2a6f40c932a 100644 |
--- a/net/cert/cert_verify_proc.cc |
+++ b/net/cert/cert_verify_proc.cc |
@@ -12,11 +12,13 @@ |
#include "base/strings/stringprintf.h" |
#include "base/time/time.h" |
#include "build/build_config.h" |
+#include "crypto/sha2.h" |
davidben
2015/03/31 02:02:12
No longer necessary here?
|
#include "net/base/net_errors.h" |
#include "net/base/net_util.h" |
#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 +237,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); |