mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 14:26:09 +03:00
cert: Use builtin verifier on Android and Linux
This commit is contained in:
parent
e1c59a6e41
commit
663fa54e81
@ -1154,7 +1154,6 @@ component("net") {
|
|||||||
"android/network_library.h",
|
"android/network_library.h",
|
||||||
"android/traffic_stats.h",
|
"android/traffic_stats.h",
|
||||||
"cert/cert_verify_proc_android.h",
|
"cert/cert_verify_proc_android.h",
|
||||||
"cert/test_root_certs_android.cc",
|
|
||||||
"proxy_resolution/proxy_config_service_android.h",
|
"proxy_resolution/proxy_config_service_android.h",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -1196,6 +1195,7 @@ component("net") {
|
|||||||
"base/network_interfaces_linux.cc",
|
"base/network_interfaces_linux.cc",
|
||||||
"base/network_interfaces_linux.h",
|
"base/network_interfaces_linux.h",
|
||||||
"base/platform_mime_util_linux.cc",
|
"base/platform_mime_util_linux.cc",
|
||||||
|
"cert/test_root_certs_builtin.cc",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,8 @@ bool CertVerifier::RequestParams::operator<(
|
|||||||
std::unique_ptr<CertVerifier> CertVerifier::CreateDefaultWithoutCaching(
|
std::unique_ptr<CertVerifier> CertVerifier::CreateDefaultWithoutCaching(
|
||||||
scoped_refptr<CertNetFetcher> cert_net_fetcher) {
|
scoped_refptr<CertNetFetcher> cert_net_fetcher) {
|
||||||
scoped_refptr<CertVerifyProc> verify_proc;
|
scoped_refptr<CertVerifyProc> verify_proc;
|
||||||
#if defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS)
|
#if defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
|
||||||
|
defined(OS_ANDROID)
|
||||||
verify_proc =
|
verify_proc =
|
||||||
CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher));
|
CertVerifyProc::CreateBuiltinVerifyProc(std::move(cert_net_fetcher));
|
||||||
#elif BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED)
|
#elif BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED)
|
||||||
|
@ -48,7 +48,8 @@
|
|||||||
#include "third_party/boringssl/src/include/openssl/pool.h"
|
#include "third_party/boringssl/src/include/openssl/pool.h"
|
||||||
#include "url/url_canon.h"
|
#include "url/url_canon.h"
|
||||||
|
|
||||||
#if defined(OS_FUCHSIA) || defined(USE_NSS_CERTS) || defined(OS_MAC)
|
#if defined(OS_FUCHSIA) || defined(USE_NSS_CERTS) || defined(OS_MAC) || \
|
||||||
|
defined(OS_ANDROID) || defined(OS_LINUX)
|
||||||
#include "net/cert/cert_verify_proc_builtin.h"
|
#include "net/cert/cert_verify_proc_builtin.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -494,7 +495,8 @@ base::Value CertVerifyParams(X509Certificate* cert,
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#if !(defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS))
|
#if !(defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
|
||||||
|
defined(OS_ANDROID))
|
||||||
// static
|
// static
|
||||||
scoped_refptr<CertVerifyProc> CertVerifyProc::CreateSystemVerifyProc(
|
scoped_refptr<CertVerifyProc> CertVerifyProc::CreateSystemVerifyProc(
|
||||||
scoped_refptr<CertNetFetcher> cert_net_fetcher) {
|
scoped_refptr<CertNetFetcher> cert_net_fetcher) {
|
||||||
@ -512,7 +514,8 @@ scoped_refptr<CertVerifyProc> CertVerifyProc::CreateSystemVerifyProc(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(OS_FUCHSIA) || defined(USE_NSS_CERTS) || defined(OS_MAC)
|
#if defined(OS_FUCHSIA) || defined(USE_NSS_CERTS) || defined(OS_MAC) || \
|
||||||
|
defined(OS_ANDROID) || defined(OS_LINUX)
|
||||||
// static
|
// static
|
||||||
scoped_refptr<CertVerifyProc> CertVerifyProc::CreateBuiltinVerifyProc(
|
scoped_refptr<CertVerifyProc> CertVerifyProc::CreateBuiltinVerifyProc(
|
||||||
scoped_refptr<CertNetFetcher> cert_net_fetcher) {
|
scoped_refptr<CertNetFetcher> cert_net_fetcher) {
|
||||||
|
@ -66,14 +66,16 @@ class NET_EXPORT CertVerifyProc
|
|||||||
kMaxValue = kChainLengthOne
|
kMaxValue = kChainLengthOne
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !(defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS))
|
#if !(defined(OS_FUCHSIA) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
|
||||||
|
defined(OS_ANDROID))
|
||||||
// Creates and returns a CertVerifyProc that uses the system verifier.
|
// Creates and returns a CertVerifyProc that uses the system verifier.
|
||||||
// |cert_net_fetcher| may not be used, depending on the implementation.
|
// |cert_net_fetcher| may not be used, depending on the implementation.
|
||||||
static scoped_refptr<CertVerifyProc> CreateSystemVerifyProc(
|
static scoped_refptr<CertVerifyProc> CreateSystemVerifyProc(
|
||||||
scoped_refptr<CertNetFetcher> cert_net_fetcher);
|
scoped_refptr<CertNetFetcher> cert_net_fetcher);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(OS_FUCHSIA) || defined(USE_NSS_CERTS) || defined(OS_MAC)
|
#if defined(OS_FUCHSIA) || defined(USE_NSS_CERTS) || defined(OS_MAC) || \
|
||||||
|
defined(OS_ANDROID) || defined(OS_LINUX)
|
||||||
// Creates and returns a CertVerifyProcBuiltin using the SSL SystemTrustStore.
|
// Creates and returns a CertVerifyProcBuiltin using the SSL SystemTrustStore.
|
||||||
static scoped_refptr<CertVerifyProc> CreateBuiltinVerifyProc(
|
static scoped_refptr<CertVerifyProc> CreateBuiltinVerifyProc(
|
||||||
scoped_refptr<CertNetFetcher> cert_net_fetcher);
|
scoped_refptr<CertNetFetcher> cert_net_fetcher);
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "net/cert/x509_certificate.h"
|
#include "net/cert/x509_certificate.h"
|
||||||
|
|
||||||
#if defined(USE_NSS_CERTS) || defined(OS_WIN) || defined(OS_APPLE) || \
|
#if defined(USE_NSS_CERTS) || defined(OS_WIN) || defined(OS_APPLE) || \
|
||||||
defined(OS_FUCHSIA)
|
defined(OS_FUCHSIA) || defined(OS_ANDROID) || defined(OS_LINUX)
|
||||||
// When not defined, the EVRootCAMetadata singleton is a dumb placeholder
|
// When not defined, the EVRootCAMetadata singleton is a dumb placeholder
|
||||||
// implementation that will fail all EV lookup operations.
|
// implementation that will fail all EV lookup operations.
|
||||||
#define PLATFORM_USES_CHROMIUM_EV_METADATA
|
#define PLATFORM_USES_CHROMIUM_EV_METADATA
|
||||||
|
Loading…
Reference in New Issue
Block a user