• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2012 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_CERT_VERIFY_PROC_ANDROID_H_
6 #define NET_CERT_CERT_VERIFY_PROC_ANDROID_H_
7 
8 #include "net/base/net_export.h"
9 #include "net/cert/cert_verify_proc.h"
10 
11 namespace net {
12 
13 class CertNetFetcher;
14 
15 // Performs certificate verification on Android by calling the platform
16 // TrustManager through JNI.
17 class NET_EXPORT CertVerifyProcAndroid : public CertVerifyProc {
18  public:
19   explicit CertVerifyProcAndroid(scoped_refptr<CertNetFetcher> net_fetcher,
20                                  scoped_refptr<CRLSet> crl_set);
21 
22   CertVerifyProcAndroid(const CertVerifyProcAndroid&) = delete;
23   CertVerifyProcAndroid& operator=(const CertVerifyProcAndroid&) = delete;
24 
25  protected:
26   ~CertVerifyProcAndroid() override;
27 
28  private:
29   int VerifyInternal(X509Certificate* cert,
30                      const std::string& hostname,
31                      const std::string& ocsp_response,
32                      const std::string& sct_list,
33                      int flags,
34                      CertVerifyResult* verify_result,
35                      const NetLogWithSource& net_log) override;
36 
37   scoped_refptr<CertNetFetcher> cert_net_fetcher_;
38 };
39 
40 }  // namespace net
41 
42 #endif  // NET_CERT_CERT_VERIFY_PROC_ANDROID_H_
43