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

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

Issue 2126803004: WIP: NSS trust store integration for path builder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert-command-line-path-builder-add_certpathbuilder
Patch Set: . Created 4 years, 4 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/cert_issuer_source_static.h" 5 #include "net/cert/internal/cert_issuer_source_static.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 CertIssuerSourceStatic::CertIssuerSourceStatic() = default; 9 CertIssuerSourceStatic::CertIssuerSourceStatic() = default;
10 CertIssuerSourceStatic::~CertIssuerSourceStatic() = default; 10 CertIssuerSourceStatic::~CertIssuerSourceStatic() = default;
11 11
12 void CertIssuerSourceStatic::AddCert(scoped_refptr<ParsedCertificate> cert) { 12 void CertIssuerSourceStatic::AddCert(scoped_refptr<ParsedCertificate> cert) {
13 intermediates_.insert(std::make_pair( 13 intermediates_.insert(std::make_pair(
14 cert->normalized_subject().AsStringPiece(), std::move(cert))); 14 cert->normalized_subject().AsStringPiece(), std::move(cert)));
15 } 15 }
16 16
17 void CertIssuerSourceStatic::SyncGetIssuersOf(const ParsedCertificate* cert, 17 void CertIssuerSourceStatic::SyncGetIssuersOf(const ParsedCertificate* cert,
18 ParsedCertificateList* issuers) { 18 ParsedCertificateList* issuers) {
19 auto range = 19 auto range =
20 intermediates_.equal_range(cert->normalized_issuer().AsStringPiece()); 20 intermediates_.equal_range(cert->normalized_issuer().AsStringPiece());
21 for (auto it = range.first; it != range.second; ++it) 21 for (auto it = range.first; it != range.second; ++it)
22 issuers->push_back(it->second); 22 issuers->push_back(it->second);
23 } 23 }
24 24
25 void CertIssuerSourceStatic::AsyncGetIssuersOf( 25 void CertIssuerSourceStatic::AsyncGetIssuersOf(
26 const ParsedCertificate* cert, 26 scoped_refptr<ParsedCertificate> cert,
27 const IssuerCallback& issuers_callback, 27 const IssuerCallback& issuers_callback,
28 std::unique_ptr<Request>* out_req) { 28 std::unique_ptr<Request>* out_req) {
29 // CertIssuerSourceStatic never returns asynchronous results. 29 // CertIssuerSourceStatic never returns asynchronous results.
30 out_req->reset(); 30 out_req->reset();
31 } 31 }
32 32
33 } // namespace net 33 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/internal/cert_issuer_source_static.h ('k') | net/cert/internal/cert_issuer_source_static_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698