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

Side by Side Diff: net/cert/internal/parsed_certificate.cc

Issue 2872113002: Add parsing code for RFC 5280 PolicyConstraints. (Closed)
Patch Set: update ios bundle_data Created 3 years, 7 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
OLDNEW
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 187 }
188 188
189 // Policies. 189 // Policies.
190 if (result->GetExtension(CertificatePoliciesOid(), &extension)) { 190 if (result->GetExtension(CertificatePoliciesOid(), &extension)) {
191 result->has_policy_oids_ = true; 191 result->has_policy_oids_ = true;
192 if (!ParseCertificatePoliciesExtension(extension.value, 192 if (!ParseCertificatePoliciesExtension(extension.value,
193 &result->policy_oids_)) { 193 &result->policy_oids_)) {
194 return nullptr; 194 return nullptr;
195 } 195 }
196 } 196 }
197
198 // Policy constraints.
199 if (result->GetExtension(PolicyConstraintsOid(), &extension)) {
200 result->has_policy_constraints_ = true;
201 if (!ParsePolicyConstraints(extension.value,
202 &result->policy_constraints_)) {
203 return nullptr;
204 }
205 }
197 } 206 }
198 207
199 return result; 208 return result;
200 } 209 }
201 210
202 } // namespace net 211 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/internal/parsed_certificate.h ('k') | net/cert/internal/parsed_certificate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698