| 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/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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 return ParsedCertificate::CreateFromCertificateData( | 155 return ParsedCertificate::CreateFromCertificateData( |
| 156 reinterpret_cast<const uint8_t*>(data.data()), data.size(), | 156 reinterpret_cast<const uint8_t*>(data.data()), data.size(), |
| 157 DataSource::INTERNAL_COPY, options); | 157 DataSource::INTERNAL_COPY, options); |
| 158 } | 158 } |
| 159 | 159 |
| 160 bool ParsedCertificate::CreateAndAddToVector( | 160 bool ParsedCertificate::CreateAndAddToVector( |
| 161 const uint8_t* data, | 161 const uint8_t* data, |
| 162 size_t length, | 162 size_t length, |
| 163 DataSource source, | 163 DataSource source, |
| 164 const ParseCertificateOptions& options, | 164 const ParseCertificateOptions& options, |
| 165 std::vector<scoped_refptr<ParsedCertificate>>* chain) { | 165 ParsedCertificateList* chain) { |
| 166 scoped_refptr<ParsedCertificate> cert( | 166 scoped_refptr<ParsedCertificate> cert( |
| 167 CreateFromCertificateData(data, length, source, options)); | 167 CreateFromCertificateData(data, length, source, options)); |
| 168 if (!cert) | 168 if (!cert) |
| 169 return false; | 169 return false; |
| 170 chain->push_back(std::move(cert)); | 170 chain->push_back(std::move(cert)); |
| 171 return true; | 171 return true; |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace net | 174 } // namespace net |
| OLD | NEW |