#include "services/cert_verifier/cert_verifier_service.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "mojo/public/cpp/bindings/message.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/base/completion_once_callback.h"
#include "net/base/ip_address.h"
#include "net/cert/cert_verify_result.h"
#include "net/cert/crl_set.h"
#include "net/cert/x509_util.h"
#include "services/cert_verifier/cert_net_url_loader/cert_net_fetcher_url_loader.h"
#include "services/cert_verifier/cert_verifier_service_factory.h"
#include "services/network/public/mojom/cert_verifier_service.mojom.h"
namespace cert_verifier {
namespace internal {
namespace {
class CertVerifyResultHelper { … };
void ReconnectURLLoaderFactory(
mojo::Remote<mojom::URLLoaderFactoryConnector>* reconnector,
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver) { … }
}
CertVerifierServiceImpl::CertVerifierServiceImpl(
std::unique_ptr<net::CertVerifierWithUpdatableProc> verifier,
mojo::PendingReceiver<mojom::CertVerifierService> service_receiver,
mojo::PendingReceiver<mojom::CertVerifierServiceUpdater> updater_receiver,
mojo::PendingRemote<mojom::CertVerifierServiceClient> client,
scoped_refptr<CertNetFetcherURLLoader> cert_net_fetcher,
net::CertVerifyProc::InstanceParams instance_params)
: … { … }
CertVerifierServiceImpl::~CertVerifierServiceImpl() { … }
void CertVerifierServiceImpl::SetConfig(
const net::CertVerifier::Config& config) { … }
void CertVerifierServiceImpl::EnableNetworkAccess(
mojo::PendingRemote<network::mojom::URLLoaderFactory> url_loader_factory,
mojo::PendingRemote<mojom::URLLoaderFactoryConnector> reconnector) { … }
void CertVerifierServiceImpl::UpdateAdditionalCertificates(
mojom::AdditionalCertificatesPtr additional_certificates) { … }
void CertVerifierServiceImpl::SetCertVerifierServiceFactory(
base::WeakPtr<cert_verifier::CertVerifierServiceFactoryImpl>
service_factory_impl) { … }
void CertVerifierServiceImpl::UpdateVerifierData(
const net::CertVerifyProc::ImplParams& impl_params) { … }
void CertVerifierServiceImpl::Verify(
const net::CertVerifier::RequestParams& params,
const net::NetLogSource& net_log_source,
mojo::PendingRemote<mojom::CertVerifierRequest> cert_verifier_request) { … }
void CertVerifierServiceImpl::OnCertVerifierChanged() { … }
void CertVerifierServiceImpl::OnDisconnectFromService() { … }
}
}