OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/internal/parsed_certificate.h" | 5 #include "net/cert/internal/parsed_certificate.h" |
6 | 6 |
7 #include "net/cert/internal/certificate_policies.h" | 7 #include "net/cert/internal/certificate_policies.h" |
8 #include "net/cert/internal/extended_key_usage.h" | 8 #include "net/cert/internal/extended_key_usage.h" |
9 #include "net/cert/internal/name_constraints.h" | 9 #include "net/cert/internal/name_constraints.h" |
10 #include "net/cert/internal/signature_algorithm.h" | 10 #include "net/cert/internal/signature_algorithm.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 } | 196 } |
197 | 197 |
198 // Policy constraints. | 198 // Policy constraints. |
199 if (result->GetExtension(PolicyConstraintsOid(), &extension)) { | 199 if (result->GetExtension(PolicyConstraintsOid(), &extension)) { |
200 result->has_policy_constraints_ = true; | 200 result->has_policy_constraints_ = true; |
201 if (!ParsePolicyConstraints(extension.value, | 201 if (!ParsePolicyConstraints(extension.value, |
202 &result->policy_constraints_)) { | 202 &result->policy_constraints_)) { |
203 return nullptr; | 203 return nullptr; |
204 } | 204 } |
205 } | 205 } |
| 206 |
| 207 // Policy mappings. |
| 208 if (result->GetExtension(PolicyMappingsOid(), &extension)) { |
| 209 result->has_policy_mappings_ = true; |
| 210 if (!ParsePolicyMappings(extension.value, &result->policy_mappings_)) { |
| 211 return nullptr; |
| 212 } |
| 213 } |
| 214 |
| 215 // Inhibit Any Policy. |
| 216 if (result->GetExtension(InhibitAnyPolicyOid(), &extension)) { |
| 217 result->has_inhibit_any_policy_ = true; |
| 218 if (!ParseInhibitAnyPolicy(extension.value, |
| 219 &result->inhibit_any_policy_)) { |
| 220 return nullptr; |
| 221 } |
| 222 } |
206 } | 223 } |
207 | 224 |
208 return result; | 225 return result; |
209 } | 226 } |
210 | 227 |
211 } // namespace net | 228 } // namespace net |
OLD | NEW |