OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |