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

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

Issue 2036033002: Add CertIssuerSourceAia: authorityInfoAccess fetching for CertPathBuilder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert-parsing-path-building
Patch Set: remove orphaned kw_args change, remove g_cur_path_id change from this cl Created 4 years, 6 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/name_constraints.h" 7 #include "net/cert/internal/name_constraints.h"
8 #include "net/cert/internal/signature_algorithm.h" 8 #include "net/cert/internal/signature_algorithm.h"
9 #include "net/cert/internal/verify_name_match.h" 9 #include "net/cert/internal/verify_name_match.h"
10 #include "net/der/parser.h" 10 #include "net/der/parser.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 // Name constraints. 120 // Name constraints.
121 if (ConsumeExtension(NameConstraintsOid(), &result->unparsed_extensions_, 121 if (ConsumeExtension(NameConstraintsOid(), &result->unparsed_extensions_,
122 &extension)) { 122 &extension)) {
123 result->name_constraints_ = 123 result->name_constraints_ =
124 NameConstraints::CreateFromDer(extension.value, extension.critical); 124 NameConstraints::CreateFromDer(extension.value, extension.critical);
125 if (!result->name_constraints_) 125 if (!result->name_constraints_)
126 return nullptr; 126 return nullptr;
127 } 127 }
128 128
129 // Authority information access.
130 if (ConsumeExtension(AuthorityInfoAccessOid(),
131 &result->unparsed_extensions_,
132 &result->authority_info_access_extension_)) {
133 result->has_authority_info_access_ = true;
134 if (!ParseAuthorityInfoAccess(
135 result->authority_info_access_extension_.value,
136 &result->ca_issuers_uris_, &result->ocsp_uris_))
137 return nullptr;
138 }
139
129 // NOTE: if additional extensions are consumed here, the verification code 140 // NOTE: if additional extensions are consumed here, the verification code
130 // must be updated to process those extensions, since the 141 // must be updated to process those extensions, since the
131 // VerifyNoUnconsumedCriticalExtensions uses the unparsed_extensions_ 142 // VerifyNoUnconsumedCriticalExtensions uses the unparsed_extensions_
132 // variable to tell which extensions were processed. 143 // variable to tell which extensions were processed.
133 } 144 }
134 145
135 return result; 146 return result;
136 } 147 }
137 148
138 scoped_refptr<ParsedCertificate> ParsedCertificate::CreateFromCertificateCopy( 149 scoped_refptr<ParsedCertificate> ParsedCertificate::CreateFromCertificateCopy(
(...skipping 10 matching lines...) Expand all
149 std::vector<scoped_refptr<ParsedCertificate>>* chain) { 160 std::vector<scoped_refptr<ParsedCertificate>>* chain) {
150 scoped_refptr<ParsedCertificate> cert( 161 scoped_refptr<ParsedCertificate> cert(
151 CreateFromCertificateData(data, length, source)); 162 CreateFromCertificateData(data, length, source));
152 if (!cert) 163 if (!cert)
153 return false; 164 return false;
154 chain->push_back(std::move(cert)); 165 chain->push_back(std::move(cert));
155 return true; 166 return true;
156 } 167 }
157 168
158 } // namespace net 169 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/internal/parsed_certificate.h ('k') | net/data/cert_issuer_source_aia_unittest/generate-certs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698