OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_TYPES_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_TYPES_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_TYPES_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_TYPES_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
| 10 #include "base/values.h" |
10 | 11 |
11 namespace chromeos { | 12 namespace chromeos { |
12 | 13 |
13 extern const char kEasyUnlockKeyMetaNameBluetoothAddress[]; | 14 extern const char kEasyUnlockKeyMetaNameBluetoothAddress[]; |
14 extern const char kEasyUnlockKeyMetaNameBluetoothType[]; | 15 extern const char kEasyUnlockKeyMetaNameBluetoothType[]; |
15 extern const char kEasyUnlockKeyMetaNamePsk[]; | 16 extern const char kEasyUnlockKeyMetaNamePsk[]; |
16 extern const char kEasyUnlockKeyMetaNamePubKey[]; | 17 extern const char kEasyUnlockKeyMetaNamePubKey[]; |
17 extern const char kEasyUnlockKeyMetaNameChallenge[]; | 18 extern const char kEasyUnlockKeyMetaNameChallenge[]; |
18 extern const char kEasyUnlockKeyMetaNameWrappedSecret[]; | 19 extern const char kEasyUnlockKeyMetaNameWrappedSecret[]; |
| 20 extern const char kEasyUnlockKeyMetaNameSerializedBeaconSeeds[]; |
19 | 21 |
20 // Device data that is stored with cryptohome keys. | 22 // Device data that is stored with cryptohome keys. |
21 struct EasyUnlockDeviceKeyData { | 23 struct EasyUnlockDeviceKeyData { |
22 // The Bluetooth type. By default, the assumed type is BLUETOOTH_CLASSIC. | 24 // The Bluetooth type. By default, the assumed type is BLUETOOTH_CLASSIC. |
23 enum BluetoothType { BLUETOOTH_CLASSIC, BLUETOOTH_LE, NUM_BLUETOOTH_TYPES }; | 25 enum BluetoothType { BLUETOOTH_CLASSIC, BLUETOOTH_LE, NUM_BLUETOOTH_TYPES }; |
24 | 26 |
25 EasyUnlockDeviceKeyData(); | 27 EasyUnlockDeviceKeyData(); |
26 EasyUnlockDeviceKeyData(const EasyUnlockDeviceKeyData& other); | 28 EasyUnlockDeviceKeyData(const EasyUnlockDeviceKeyData& other); |
27 ~EasyUnlockDeviceKeyData(); | 29 ~EasyUnlockDeviceKeyData(); |
28 | 30 |
29 // Bluetooth address of the remote device. | 31 // Bluetooth address of the remote device. |
30 std::string bluetooth_address; | 32 std::string bluetooth_address; |
31 // The Bluetooth type to connect to the device. | 33 // The Bluetooth type to connect to the device. |
32 BluetoothType bluetooth_type; | 34 BluetoothType bluetooth_type; |
33 // Public key of the remote device. | 35 // Public key of the remote device. |
34 std::string public_key; | 36 std::string public_key; |
35 // Key to establish a secure channel with the remote device. | 37 // Key to establish a secure channel with the remote device. |
36 std::string psk; | 38 std::string psk; |
37 // Challenge bytes to be sent to the phone. | 39 // Challenge bytes to be sent to the phone. |
38 std::string challenge; | 40 std::string challenge; |
39 // Wrapped secret to mount cryptohome home. | 41 // Wrapped secret to mount cryptohome home. |
40 std::string wrapped_secret; | 42 std::string wrapped_secret; |
| 43 // Serialized BeaconSeeds used to identify this device. |
| 44 std::string serialized_beacon_seeds; |
41 }; | 45 }; |
42 typedef std::vector<EasyUnlockDeviceKeyData> EasyUnlockDeviceKeyDataList; | 46 typedef std::vector<EasyUnlockDeviceKeyData> EasyUnlockDeviceKeyDataList; |
43 | 47 |
44 } // namespace chromeos | 48 } // namespace chromeos |
45 | 49 |
46 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_TYPES_H_ | 50 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_EASY_UNLOCK_TYPES_H_ |
OLD | NEW |