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

Side by Side Diff: net/cert/asn1_util.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 unified diff | Download patch
« no previous file with comments | « no previous file | net/cert/internal/certificate_policies.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/asn1_util.h" 5 #include "net/cert/asn1_util.h"
6 6
7 #include "net/der/input.h" 7 #include "net/der/input.h"
8 #include "net/der/parser.h" 8 #include "net/der/parser.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return false; 178 return false;
179 179
180 der::Input oid; 180 der::Input oid;
181 if (!extension_parser.ReadTag(der::kOid, &oid)) 181 if (!extension_parser.ReadTag(der::kOid, &oid))
182 return false; 182 return false;
183 183
184 // kCRLDistributionPointsOID is the DER encoding of the OID for the X.509 184 // kCRLDistributionPointsOID is the DER encoding of the OID for the X.509
185 // CRL Distribution Points extension. 185 // CRL Distribution Points extension.
186 static const uint8_t kCRLDistributionPointsOID[] = {0x55, 0x1d, 0x1f}; 186 static const uint8_t kCRLDistributionPointsOID[] = {0x55, 0x1d, 0x1f};
187 187
188 if (!oid.Equals(der::Input(kCRLDistributionPointsOID))) 188 if (oid != der::Input(kCRLDistributionPointsOID))
189 continue; 189 continue;
190 190
191 // critical 191 // critical
192 if (!extension_parser.SkipOptionalTag(der::kBool, &present)) 192 if (!extension_parser.SkipOptionalTag(der::kBool, &present))
193 return false; 193 return false;
194 194
195 // extnValue 195 // extnValue
196 der::Input extension_value; 196 der::Input extension_value;
197 if (!extension_parser.ReadTag(der::kOctetString, &extension_value)) 197 if (!extension_parser.ReadTag(der::kOctetString, &extension_value))
198 return false; 198 return false;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 } 286 }
287 287
288 urls_out->swap(tmp_urls_out); 288 urls_out->swap(tmp_urls_out);
289 return true; 289 return true;
290 } 290 }
291 291
292 } // namespace asn1 292 } // namespace asn1
293 293
294 } // namespace net 294 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/cert/internal/certificate_policies.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698