chromium/services/network/test/fake_test_cert_verifier_params_factory.h

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SERVICES_NETWORK_TEST_FAKE_TEST_CERT_VERIFIER_PARAMS_FACTORY_H_
#define SERVICES_NETWORK_TEST_FAKE_TEST_CERT_VERIFIER_PARAMS_FACTORY_H_

#include "net/cert/cert_verifier.h"
#include "services/network/public/mojom/cert_verifier_service.mojom.h"
#include "services/network/public/mojom/network_context.mojom-forward.h"

namespace network {

// FakeTestCertVerifierParamsFactory::GetCertVerifierParams returns a
// mojom::CertVerifierParamsPtr, which either contains the parameters for a real
// in-network-service CertVerifier, or contains a pipe to a fake
// CertVerifierService that successfully verifies every certificate, even
// invalid ones. This is useful for tests that need to set up a NetworkContext,
// which requires CertVerifierParams, but the test doesn't actually need to test
// cert verifier behavior.
class FakeTestCertVerifierParamsFactory
    : public cert_verifier::mojom::CertVerifierService {};

}  // namespace network

#endif  // SERVICES_NETWORK_TEST_FAKE_TEST_CERT_VERIFIER_PARAMS_FACTORY_H_