| 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/cert_issuer_source_aia.h" | 5 #include "net/cert/internal/cert_issuer_source_aia.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "net/cert/cert_net_fetcher.h" | 8 #include "net/cert/cert_net_fetcher.h" |
| 9 #include "net/cert/internal/cert_errors.h" | 9 #include "net/cert/internal/cert_errors.h" |
| 10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 LOG(ERROR) << "Error parsing cert retrieved from AIA:\n" | 86 LOG(ERROR) << "Error parsing cert retrieved from AIA:\n" |
| 87 << errors.ToDebugString(); | 87 << errors.ToDebugString(); |
| 88 return false; | 88 return false; |
| 89 } | 89 } |
| 90 | 90 |
| 91 return true; | 91 return true; |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace | 94 } // namespace |
| 95 | 95 |
| 96 CertIssuerSourceAia::CertIssuerSourceAia(CertNetFetcher* cert_fetcher) | 96 CertIssuerSourceAia::CertIssuerSourceAia( |
| 97 : cert_fetcher_(cert_fetcher) {} | 97 scoped_refptr<CertNetFetcher> cert_fetcher) |
| 98 : cert_fetcher_(std::move(cert_fetcher)) {} |
| 98 | 99 |
| 99 CertIssuerSourceAia::~CertIssuerSourceAia() = default; | 100 CertIssuerSourceAia::~CertIssuerSourceAia() = default; |
| 100 | 101 |
| 101 void CertIssuerSourceAia::SyncGetIssuersOf(const ParsedCertificate* cert, | 102 void CertIssuerSourceAia::SyncGetIssuersOf(const ParsedCertificate* cert, |
| 102 ParsedCertificateList* issuers) { | 103 ParsedCertificateList* issuers) { |
| 103 // CertIssuerSourceAia never returns synchronous results. | 104 // CertIssuerSourceAia never returns synchronous results. |
| 104 } | 105 } |
| 105 | 106 |
| 106 void CertIssuerSourceAia::AsyncGetIssuersOf(const ParsedCertificate* cert, | 107 void CertIssuerSourceAia::AsyncGetIssuersOf(const ParsedCertificate* cert, |
| 107 std::unique_ptr<Request>* out_req) { | 108 std::unique_ptr<Request>* out_req) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // that this doesn't need to wait for async callback just to tell that an | 145 // that this doesn't need to wait for async callback just to tell that an |
| 145 // URL has an unsupported scheme? | 146 // URL has an unsupported scheme? |
| 146 aia_request->AddCertFetcherRequest(cert_fetcher_->FetchCaIssuers( | 147 aia_request->AddCertFetcherRequest(cert_fetcher_->FetchCaIssuers( |
| 147 url, kTimeoutMilliseconds, kMaxResponseBytes)); | 148 url, kTimeoutMilliseconds, kMaxResponseBytes)); |
| 148 } | 149 } |
| 149 | 150 |
| 150 *out_req = std::move(aia_request); | 151 *out_req = std::move(aia_request); |
| 151 } | 152 } |
| 152 | 153 |
| 153 } // namespace net | 154 } // namespace net |
| OLD | NEW |