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

Unified Diff: net/cert/cert_verify_proc_android.cc

Issue 2627523002: Refactor the assignment of CertVerifyResult::has_md2, etc. (Closed)
Patch Set: Created 3 years, 11 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/cert_verify_proc_android.cc
diff --git a/net/cert/cert_verify_proc_android.cc b/net/cert/cert_verify_proc_android.cc
index cdc8347a1df5a9acb405c814430b81c0766efaab..f90f5721c3db34209fa0f82d466ed23cefc521e5 100644
--- a/net/cert/cert_verify_proc_android.cc
+++ b/net/cert/cert_verify_proc_android.cc
@@ -79,17 +79,6 @@ bool VerifyFromAndroidTrustManager(const std::vector<std::string>& cert_bytes,
chain.push_back(verify_result->verified_cert->os_cert_handle());
chain.insert(chain.end(), intermediates.begin(), intermediates.end());
- // If the chain successfully verified, ignore the trust anchor (the last
- // certificate). Otherwise, assume the chain is partial. This is not entirely
- // correct, as a full chain may have been constructed and then failed to
- // validate. However, if that is the case, the more serious error will
- // override any SHA-1 considerations.
- size_t correction_for_root =
- (status == android::CERT_VERIFY_STATUS_ANDROID_OK) ? 1 : 0;
- for (size_t i = 0; i < chain.size() - correction_for_root; ++i) {
- FillCertVerifyResultWeakSignature(chain[i], i == 0, verify_result);
- }
-
// Extract the public key hashes.
for (size_t i = 0; i < verified_chain.size(); i++) {
base::StringPiece spki_bytes;

Powered by Google App Engine
This is Rietveld 408576698