chromium/crypto/unexportable_key.cc

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

#include "crypto/unexportable_key.h"

#include "base/check.h"
#include "base/functional/bind.h"

namespace crypto {

namespace {
std::unique_ptr<UnexportableKeyProvider> (*g_mock_provider)() =;
}  // namespace

UnexportableSigningKey::~UnexportableSigningKey() = default;
UnexportableKeyProvider::~UnexportableKeyProvider() = default;
VirtualUnexportableSigningKey::~VirtualUnexportableSigningKey() = default;
VirtualUnexportableKeyProvider::~VirtualUnexportableKeyProvider() = default;

bool UnexportableSigningKey::IsHardwareBacked() const {}

#if BUILDFLAG(IS_WIN)
std::unique_ptr<UnexportableKeyProvider> GetUnexportableKeyProviderWin();
std::unique_ptr<VirtualUnexportableKeyProvider>
GetVirtualUnexportableKeyProviderWin();
#elif BUILDFLAG(IS_MAC)
std::unique_ptr<UnexportableKeyProvider> GetUnexportableKeyProviderMac(
    UnexportableKeyProvider::Config config);
#endif

// Implemented in unexportable_key_software_unsecure.cc.
std::unique_ptr<UnexportableKeyProvider>
GetUnexportableKeyProviderSoftwareUnsecure();

std::unique_ptr<UnexportableKeyProvider> GetUnexportableKeyProvider(
    UnexportableKeyProvider::Config config) {}

std::unique_ptr<VirtualUnexportableKeyProvider>
GetVirtualUnexportableKeyProvider_DO_NOT_USE_METRICS_ONLY() {}

namespace internal {

bool HasScopedUnexportableKeyProvider() {}

void SetUnexportableKeyProviderForTesting(
    std::unique_ptr<UnexportableKeyProvider> (*func)()) {}

}  // namespace internal
}  // namespace crypto