• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_AIA_H_
6 #define NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_AIA_H_
7 
8 #include "base/memory/scoped_refptr.h"
9 #include "base/strings/string_piece.h"
10 #include "net/base/net_export.h"
11 #include "net/cert/pki/cert_issuer_source.h"
12 
13 namespace net {
14 
15 class CertNetFetcher;
16 
17 class NET_EXPORT CertIssuerSourceAia : public CertIssuerSource {
18  public:
19   // Creates CertIssuerSource that will use |cert_fetcher| to retrieve issuers
20   // using AuthorityInfoAccess URIs. CertIssuerSourceAia must be created and
21   // used only on a single thread, which is the thread |cert_fetcher| will be
22   // operated from.
23   explicit CertIssuerSourceAia(scoped_refptr<CertNetFetcher> cert_fetcher);
24 
25   CertIssuerSourceAia(const CertIssuerSourceAia&) = delete;
26   CertIssuerSourceAia& operator=(const CertIssuerSourceAia&) = delete;
27 
28   ~CertIssuerSourceAia() override;
29 
30   // CertIssuerSource implementation:
31   void SyncGetIssuersOf(const ParsedCertificate* cert,
32                         ParsedCertificateList* issuers) override;
33   void AsyncGetIssuersOf(const ParsedCertificate* cert,
34                          std::unique_ptr<Request>* out_req) override;
35 
36  private:
37   scoped_refptr<CertNetFetcher> cert_fetcher_;
38 };
39 
40 }  // namespace net
41 
42 #endif  // NET_CERT_INTERNAL_CERT_ISSUER_SOURCE_AIA_H_
43