OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 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_POLICY_CORE_COMMON_CLOUD_SIGNING_SERVICE_H_ |
| 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_SIGNING_SERVICE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/callback_forward.h" |
| 11 #include "components/policy/policy_export.h" |
| 12 #include "components/policy/proto/device_management_backend.pb.h" |
| 13 |
| 14 namespace policy { |
| 15 |
| 16 // Data signing interface. |
| 17 class POLICY_EXPORT SigningService { |
| 18 public: |
| 19 using SigningCallback = base::Callback<void(bool success, |
| 20 enterprise_management::SignedData signed_data)>; |
| 21 |
| 22 // Signs |data| and calls |callback| with the signed data. |
| 23 virtual void SignData(const std::string& data, |
| 24 const SigningCallback& callback) = 0; |
| 25 }; |
| 26 |
| 27 } // namespace policy |
| 28 |
| 29 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_SIGNING_SERVICE_H_ |
| 30 |
OLD | NEW |