[M120 Migration][VD] Enable direct rendering for TVPlus
[platform/framework/web/chromium-efl.git] / components / ownership / owner_key_util_impl.h
1 // Copyright 2014 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.
4
5 #ifndef COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_IMPL_H_
6 #define COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_IMPL_H_
7
8 #include <stdint.h>
9
10 #include "base/compiler_specific.h"
11 #include "base/files/file_path.h"
12 #include "components/ownership/owner_key_util.h"
13 #include "components/ownership/ownership_export.h"
14
15 namespace ownership {
16
17 // Implementation of OwnerKeyUtil which imports public part of the
18 // owner key from a filesystem.
19 class OWNERSHIP_EXPORT OwnerKeyUtilImpl : public OwnerKeyUtil {
20  public:
21   explicit OwnerKeyUtilImpl(const base::FilePath& public_key_file);
22
23   OwnerKeyUtilImpl(const OwnerKeyUtilImpl&) = delete;
24   OwnerKeyUtilImpl& operator=(const OwnerKeyUtilImpl&) = delete;
25
26   // OwnerKeyUtil implementation:
27   scoped_refptr<PublicKey> ImportPublicKey() override;
28   crypto::ScopedSECKEYPrivateKey GenerateKeyPair(PK11SlotInfo* slot) override;
29   crypto::ScopedSECKEYPrivateKey FindPrivateKeyInSlot(
30       const std::vector<uint8_t>& key,
31       PK11SlotInfo* slot) override;
32   bool IsPublicKeyPresent() override;
33
34  private:
35   ~OwnerKeyUtilImpl() override;
36
37   // The file that holds the public key.
38   base::FilePath public_key_file_;
39 };
40
41 }  // namespace ownership
42
43 #endif  // COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_IMPL_H_