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

Unified Diff: net/cert/internal/certificate_policies.cc

Issue 1664243002: Using == instead of Equals for der::Input comparison. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing comment. Created 4 years, 10 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/asn1_util.cc ('k') | net/cert/internal/extended_key_usage_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/certificate_policies.cc
diff --git a/net/cert/internal/certificate_policies.cc b/net/cert/internal/certificate_policies.cc
index 4ff3a3a65951bd506ba27887a9b08caf13bed90e..7fa5dacf0605f8e859348be5555dfb5160f5da67 100644
--- a/net/cert/internal/certificate_policies.cc
+++ b/net/cert/internal/certificate_policies.cc
@@ -56,9 +56,8 @@ bool ParsePolicyQualifiers(const der::Input& policy_oid,
// RFC 5280 section 4.2.1.4: When qualifiers are used with the special
// policy anyPolicy, they MUST be limited to the qualifiers identified in
// this section.
- if (policy_oid.Equals(AnyPolicy()) &&
- !qualifier_oid.Equals(CpsPointerId()) &&
- !qualifier_oid.Equals(UserNoticeId())) {
+ if (policy_oid == AnyPolicy() && qualifier_oid != CpsPointerId() &&
+ qualifier_oid != UserNoticeId()) {
return false;
}
der::Tag tag;
@@ -152,7 +151,7 @@ bool ParseCertificatePoliciesExtension(const der::Input& extension_value,
std::lower_bound(policies->begin(), policies->end(), policy_oid);
// RFC 5280 section 4.2.1.4: A certificate policy OID MUST NOT appear more
// than once in a certificate policies extension.
- if (i != policies->end() && i->Equals(policy_oid))
+ if (i != policies->end() && *i == policy_oid)
return false;
policies->insert(i, policy_oid);
« no previous file with comments | « net/cert/asn1_util.cc ('k') | net/cert/internal/extended_key_usage_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698