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

Side by Side Diff: net/cert/x509_util.cc

Issue 2353333003: Rename CreateFromDer() to Create(). (Closed)
Patch Set: rebase Created 4 years, 2 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
« no previous file with comments | « net/cert/internal/parsed_certificate.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/x509_util.h" 5 #include "net/cert/x509_util.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "crypto/ec_private_key.h" 10 #include "crypto/ec_private_key.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 return true; 152 return true;
153 153
154 std::map<der::Input, ParsedExtension> extensions; 154 std::map<der::Input, ParsedExtension> extensions;
155 if (!ParseExtensions(parsed_tbs_cert.extensions_tlv, &extensions)) 155 if (!ParseExtensions(parsed_tbs_cert.extensions_tlv, &extensions))
156 return false; 156 return false;
157 157
158 std::vector<std::string> san; 158 std::vector<std::string> san;
159 auto iter = extensions.find(SubjectAltNameOid()); 159 auto iter = extensions.find(SubjectAltNameOid());
160 if (iter != extensions.end()) { 160 if (iter != extensions.end()) {
161 std::unique_ptr<GeneralNames> subject_alt_names = 161 std::unique_ptr<GeneralNames> subject_alt_names =
162 GeneralNames::CreateFromDer(iter->second.value); 162 GeneralNames::Create(iter->second.value);
163 if (subject_alt_names) { 163 if (subject_alt_names) {
164 *dns_names = subject_alt_names->dns_names; 164 *dns_names = subject_alt_names->dns_names;
165 for (const auto& ip : subject_alt_names->ip_addresses) 165 for (const auto& ip : subject_alt_names->ip_addresses)
166 ip_addresses->push_back(ip.ToString()); 166 ip_addresses->push_back(ip.ToString());
167 } 167 }
168 } 168 }
169 169
170 return true; 170 return true;
171 } 171 }
172 172
173 } // namespace x509_util 173 } // namespace x509_util
174 174
175 } // namespace net 175 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/internal/parsed_certificate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698