#include "components/enterprise/client_certificates/core/unexportable_private_key_factory.h"
#include <array>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "components/enterprise/client_certificates/core/private_key.h"
#include "components/enterprise/client_certificates/core/unexportable_private_key.h"
#include "crypto/unexportable_key.h"
#include "net/ssl/ssl_private_key.h"
namespace client_certificates {
namespace {
scoped_refptr<UnexportablePrivateKey> CreateKey(
crypto::UnexportableKeyProvider::Config config) { … }
scoped_refptr<UnexportablePrivateKey> LoadKeyFromWrapped(
const std::vector<uint8_t>& wrapped_key,
crypto::UnexportableKeyProvider::Config config) { … }
}
std::unique_ptr<UnexportablePrivateKeyFactory>
UnexportablePrivateKeyFactory::TryCreate(
crypto::UnexportableKeyProvider::Config config) { … }
UnexportablePrivateKeyFactory::UnexportablePrivateKeyFactory(
crypto::UnexportableKeyProvider::Config config)
: … { … }
UnexportablePrivateKeyFactory::~UnexportablePrivateKeyFactory() = default;
void UnexportablePrivateKeyFactory::CreatePrivateKey(
PrivateKeyCallback callback) { … }
void UnexportablePrivateKeyFactory::LoadPrivateKey(
const client_certificates_pb::PrivateKey& serialized_private_key,
PrivateKeyCallback callback) { … }
}