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

Unified Diff: ios/web/navigation/crw_session_certificate_policy_manager.mm

Issue 2000503002: Remove the fingerprint and ca_fingerprint from X509Certificate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_cache
Patch Set: Feedback Created 4 years, 6 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: ios/web/navigation/crw_session_certificate_policy_manager.mm
diff --git a/ios/web/navigation/crw_session_certificate_policy_manager.mm b/ios/web/navigation/crw_session_certificate_policy_manager.mm
index 5be4bae8bc40e9646c290accbd925faaec6c451a..b3834ef48e0239ad828696b5f89ddd85b94965f4 100644
--- a/ios/web/navigation/crw_session_certificate_policy_manager.mm
+++ b/ios/web/navigation/crw_session_certificate_policy_manager.mm
@@ -13,6 +13,7 @@
#include "base/strings/sys_string_conversions.h"
#include "ios/web/public/certificate_policy_cache.h"
#include "ios/web/public/web_thread.h"
+#include "net/base/hash_value.h"
#include "net/cert/x509_certificate.h"
// Break if we detect that CertStatus values changed, because we persist them on
@@ -50,6 +51,7 @@ NSString* const kAllowedCertificatesKey = @"allowedCertificates";
struct AllowedCertificate {
scoped_refptr<net::X509Certificate> certificate;
+ net::SHA256HashValue certificateHash;
eroman 2016/06/09 22:18:25 Is the use of camel case here intentional? (Not fa
Ryan Sleevi 2016/06/09 22:59:36 Yeah, obj-C rules - https://google.github.io/style
std::string host;
};
@@ -59,10 +61,10 @@ class LessThan {
const AllowedCertificate& rhs) const {
if (lhs.host != rhs.host)
return lhs.host < rhs.host;
- return certificateCompare_(lhs.certificate, rhs.certificate);
+ return hashCompare_(lhs.certificateHash, rhs.certificateHash);
eroman 2016/06/09 22:18:25 IMPORTANT: Where is certificateHash initialized?
Ryan Sleevi 2016/06/09 22:59:36 It's an object itself (an object functor) so it's
}
private:
- net::X509Certificate::LessThan certificateCompare_;
+ net::SHA256HashValue::LessThan hashCompare_;
eroman 2016/06/09 22:18:25 I thought it was SHA256HashValueLessThan? Also wei
Ryan Sleevi 2016/06/09 22:59:36 You're right, it's a typo.
};
typedef std::map<AllowedCertificate, net::CertStatus, LessThan>

Powered by Google App Engine
This is Rietveld 408576698