test_ssl_config_service.h 797 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef NET_SSL_TEST_SSL_CONFIG_SERVICE_H_
  5. #define NET_SSL_TEST_SSL_CONFIG_SERVICE_H_
  6. #include "net/ssl/ssl_config_service.h"
  7. namespace net {
  8. class TestSSLConfigService : public SSLConfigService {
  9. public:
  10. explicit TestSSLConfigService(const SSLContextConfig& config);
  11. ~TestSSLConfigService() override;
  12. void UpdateSSLConfigAndNotify(const SSLContextConfig& config);
  13. SSLContextConfig GetSSLContextConfig() override;
  14. bool CanShareConnectionWithClientCerts(
  15. const std::string& hostname) const override;
  16. private:
  17. SSLContextConfig config_;
  18. };
  19. } // namespace net
  20. #endif // NET_SSL_TEST_SSL_CONFIG_SERVICE_H_