1 // Copyright 2021 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CRYPTO_SCOPED_MOCK_UNEXPORTABLE_KEY_PROVIDER_H_
6 #define CRYPTO_SCOPED_MOCK_UNEXPORTABLE_KEY_PROVIDER_H_
10 // ScopedMockUnexportableKeyProvider causes
11 // |GetUnexportableKeyProvider| to return a mock, software-based
12 // implementation of |UnexportableKeyProvider| while it is in scope.
14 // This needs you to link against the test_support target.
15 class ScopedMockUnexportableKeyProvider {
17 ScopedMockUnexportableKeyProvider();
18 ~ScopedMockUnexportableKeyProvider();
21 // `ScopedNullUnexportableKeyProvider` causes `GetUnexportableKeyProvider` to
22 // return a nullptr, emulating the key provider not being supported.
23 class ScopedNullUnexportableKeyProvider {
25 ScopedNullUnexportableKeyProvider();
26 ~ScopedNullUnexportableKeyProvider();
31 #endif // CRYPTO_SCOPED_MOCK_UNEXPORTABLE_KEY_PROVIDER_H_