Index: components/ownership/owner_key_util_impl.h |
diff --git a/components/ownership/owner_key_util_impl.h b/components/ownership/owner_key_util_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cda73738d2e54bd283deeae767f87aaa4e88ab5c |
--- /dev/null |
+++ b/components/ownership/owner_key_util_impl.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_IMPL_H_ |
+#define COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_IMPL_H_ |
+ |
+#include "base/compiler_specific.h" |
+#include "base/files/file_path.h" |
+#include "base/macros.h" |
+#include "components/ownership/owner_key_util.h" |
+#include "components/ownership/ownership_export.h" |
+ |
+namespace ownership { |
+ |
+// Implementation of OwnerKeyUtil that is used in production code. |
+class OWNERSHIP_EXPORT OwnerKeyUtilImpl : public OwnerKeyUtil { |
+ public: |
+ // OwnerKeyUtil: |
+ virtual bool ImportPublicKey(std::vector<uint8>* output) OVERRIDE; |
+ virtual crypto::RSAPrivateKey* FindPrivateKeyInSlot( |
+ const std::vector<uint8>& key, |
+ PK11SlotInfo* slot) OVERRIDE; |
+ virtual bool IsPublicKeyPresent() OVERRIDE; |
+ |
+ protected: |
+ friend class OwnerKeyUtil; |
+ friend class OwnerKeyUtilImplTest; |
+ |
+ explicit OwnerKeyUtilImpl(const base::FilePath& public_key_file); |
+ |
+ virtual ~OwnerKeyUtilImpl(); |
+ |
+ private: |
+ // The file that holds the public key. |
+ base::FilePath public_key_file_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(OwnerKeyUtilImpl); |
+}; |
+ |
+} // namespace ownership |
+ |
+#endif // COMPONENTS_OWNERSHIP_OWNER_KEY_UTIL_IMPL_H_ |