1 // Copyright 2018 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 5 #ifndef SERVICES_NETWORK_SSL_CONFIG_TYPE_CONVERTER_H_ 6 #define SERVICES_NETWORK_SSL_CONFIG_TYPE_CONVERTER_H_ 7 8 #include "net/cert/cert_verifier.h" 9 #include "net/ssl/ssl_config_service.h" 10 #include "services/network/public/mojom/ssl_config.mojom.h" 11 12 namespace mojo { 13 14 int MojoSSLVersionToNetSSLVersion(network::mojom::SSLVersion mojo_version); 15 16 // Converts a net::SSLContextConfig to network::mojom::SSLConfigPtr. Tested in 17 // SSLConfigServiceMojo's unittests. 18 net::SSLContextConfig MojoSSLConfigToSSLContextConfig( 19 const network::mojom::SSLConfigPtr& mojo_config); 20 21 // Converts a network::mojom::SSLConfigPtr to a net::CertVerifier::Config. 22 // Tested in SSLConfigServiceMojo's unittests. 23 net::CertVerifier::Config MojoSSLConfigToCertVerifierConfig( 24 const network::mojom::SSLConfigPtr& mojo_config); 25 26 } // namespace mojo 27 28 #endif // SERVICES_NETWORK_SSL_CONFIG_TYPE_CONVERTER_H_ 29