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

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: review changes 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 if (!ParseAuthorityInfoAccess(
134 result->authority_info_access_extension_.value,
135 &result->ca_issuers_uris_, &result->ocsp_uris_))
136 return nullptr;
137 }
138
129 // NOTE: if additional extensions are consumed here, the verification code 139 // NOTE: if additional extensions are consumed here, the verification code
130 // must be updated to process those extensions, since the 140 // must be updated to process those extensions, since the
131 // VerifyNoUnconsumedCriticalExtensions uses the unparsed_extensions_ 141 // VerifyNoUnconsumedCriticalExtensions uses the unparsed_extensions_
132 // variable to tell which extensions were processed. 142 // variable to tell which extensions were processed.
133 } 143 }
134 144
135 return result; 145 return result;
136 } 146 }
137 147
138 scoped_refptr<ParsedCertificate> ParsedCertificate::CreateFromCertificateCopy( 148 scoped_refptr<ParsedCertificate> ParsedCertificate::CreateFromCertificateCopy(
(...skipping 10 matching lines...) Expand all
149 std::vector<scoped_refptr<ParsedCertificate>>* chain) { 159 std::vector<scoped_refptr<ParsedCertificate>>* chain) {
150 scoped_refptr<ParsedCertificate> cert( 160 scoped_refptr<ParsedCertificate> cert(
151 CreateFromCertificateData(data, length, source)); 161 CreateFromCertificateData(data, length, source));
152 if (!cert) 162 if (!cert)
153 return false; 163 return false;
154 chain->push_back(std::move(cert)); 164 chain->push_back(std::move(cert));
155 return true; 165 return true;
156 } 166 }
157 167
158 } // namespace net 168 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698