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 bool SupportsAdditionalTrustAnchors() const override; 26 27 protected: 28 ~CertVerifyProcAndroid() override; 29 30 private: 31 int VerifyInternal(X509Certificate* cert, 32 const std::string& hostname, 33 const std::string& ocsp_response, 34 const std::string& sct_list, 35 int flags, 36 const CertificateList& additional_trust_anchors, 37 CertVerifyResult* verify_result, 38 const NetLogWithSource& net_log) override; 39 40 scoped_refptr<CertNetFetcher> cert_net_fetcher_; 41 }; 42 43 } // namespace net 44 45 #endif // NET_CERT_CERT_VERIFY_PROC_ANDROID_H_ 46