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

Unified Diff: net/cert/cert_verify_result.cc

Issue 2021433004: Cert - protobufs to serialize and deserialize CertVerifierCache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_support_for_walking_1999733002
Patch Set: Fix comments 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
« no previous file with comments | « net/cert/cert_verify_result.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_result.cc
diff --git a/net/cert/cert_verify_result.cc b/net/cert/cert_verify_result.cc
index 7a1082e9f44162efb747b988f8fe7f0d593c4e3a..1b91fc7d23f43b9e217ca4b9b513d5cfda6c7abd 100644
--- a/net/cert/cert_verify_result.cc
+++ b/net/cert/cert_verify_result.cc
@@ -4,6 +4,8 @@
#include "net/cert/cert_verify_result.h"
+#include <tuple>
+
#include "net/cert/x509_certificate.h"
namespace net {
@@ -32,4 +34,17 @@ void CertVerifyResult::Reset() {
public_key_hashes.clear();
}
+bool CertVerifyResult::operator==(const CertVerifyResult& other) const {
+ return verified_cert->Equals(other.verified_cert.get()) &&
+ std::tie(cert_status, has_md2, has_md4, has_md5, has_sha1,
+ has_sha1_leaf, public_key_hashes, is_issued_by_known_root,
+ is_issued_by_additional_trust_anchor,
+ common_name_fallback_used) ==
+ std::tie(other.cert_status, other.has_md2, other.has_md4,
+ other.has_md5, other.has_sha1, other.has_sha1_leaf,
+ other.public_key_hashes, other.is_issued_by_known_root,
+ other.is_issued_by_additional_trust_anchor,
+ other.common_name_fallback_used);
+}
+
} // namespace net
« no previous file with comments | « net/cert/cert_verify_result.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698