#include "components/enterprise/client_certificates/core/ssl_key_converter.h"
#include "base/check.h"
#include "build/build_config.h"
#include "net/ssl/openssl_private_key.h"
#include "net/ssl/ssl_private_key.h"
#include "third_party/boringssl/src/include/openssl/evp.h"
#if BUILDFLAG(IS_WIN)
#include "net/ssl/ssl_platform_key_win.h"
#elif BUILDFLAG(IS_MAC)
#include "net/ssl/ssl_platform_key_mac.h"
#endif
namespace client_certificates {
namespace {
std::unique_ptr<SSLKeyConverter> (*g_mock_converter)() = …;
}
class SSLKeyConverterImpl : public SSLKeyConverter { … };
SSLKeyConverter::~SSLKeyConverter() = default;
std::unique_ptr<SSLKeyConverter> SSLKeyConverter::Get() { … }
SSLKeyConverterImpl::SSLKeyConverterImpl() = default;
SSLKeyConverterImpl::~SSLKeyConverterImpl() = default;
scoped_refptr<net::SSLPrivateKey>
SSLKeyConverterImpl::ConvertUnexportableKeySlowly(
const crypto::UnexportableSigningKey& key) { … }
scoped_refptr<net::SSLPrivateKey> SSLKeyConverterImpl::ConvertECKey(
const crypto::ECPrivateKey& key) { … }
namespace internal {
void SetConverterForTesting(std::unique_ptr<SSLKeyConverter> (*func)()) { … }
}
}