OLD | NEW |
1 /* Copyright 2013 The Chromium Authors. All rights reserved. | 1 /* Copyright 2013 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 | 5 |
6 /** | 6 /** |
7 * This file defines the API for platform verification. Currently, it only | 7 * This file defines the API for platform verification. Currently, it only |
8 * supports Chrome OS. | 8 * supports Chrome OS. |
9 */ | 9 */ |
10 | 10 |
11 [generate_thunk] | 11 [generate_thunk] |
12 | 12 |
13 label Chrome { | 13 label Chrome { |
14 M31 = 0.1 | 14 M32 = 0.2 |
15 }; | 15 }; |
16 | 16 |
17 /** | 17 /** |
18 * The <code>PPB_PlatformVerification_Private</code> interface allows authorized | 18 * The <code>PPB_PlatformVerification_Private</code> interface allows authorized |
19 * services to verify that the underlying platform is trusted. An example of a | 19 * services to verify that the underlying platform is trusted. An example of a |
20 * trusted platform is a Chrome OS device in verified boot mode. | 20 * trusted platform is a Chrome OS device in verified boot mode. |
21 */ | 21 */ |
22 | 22 |
23 interface PPB_PlatformVerification_Private { | 23 interface PPB_PlatformVerification_Private { |
24 /** | 24 /** |
(...skipping 16 matching lines...) Expand all Loading... |
41 * <code>PPB_PlatformVerification_Private</code>. | 41 * <code>PPB_PlatformVerification_Private</code>. |
42 * | 42 * |
43 * @return <code>PP_TRUE</code> if the resource is a | 43 * @return <code>PP_TRUE</code> if the resource is a |
44 * <code>PPB_PlatformVerification_Private</code>, <code>PP_FALSE</code> if the | 44 * <code>PPB_PlatformVerification_Private</code>, <code>PP_FALSE</code> if the |
45 * resource is invalid or some type other than | 45 * resource is invalid or some type other than |
46 * <code>PPB_PlatformVerification_Private</code>. | 46 * <code>PPB_PlatformVerification_Private</code>. |
47 */ | 47 */ |
48 PP_Bool IsPlatformVerification([in] PP_Resource resource); | 48 PP_Bool IsPlatformVerification([in] PP_Resource resource); |
49 | 49 |
50 /** | 50 /** |
51 * Check if the underlying host platform can be challenged; i.e., verified as | |
52 * a trusted platform. Useful for avoiding unnecessary work on platforms | |
53 * which will always fail; i.e. dev mode Chrome OS. | |
54 | |
55 * @param[out] can_challenge_platform A <code>PP_Bool</code> which is set to | |
56 * <code>PP_TRUE</code> if a platform challenge might pass and | |
57 * <code>PP_FALSE</code> if it definitely won't. | |
58 * | |
59 * @param[in] callback A <code>PP_CompletionCallback</code> to be called after | |
60 * the method has been completed. This callback will only run if the return | |
61 * code is <code>PP_OK_COMPLETIONPENDING</code>. | |
62 * | |
63 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | |
64 */ | |
65 int32_t CanChallengePlatform([in] PP_Resource instance, | |
66 [out] PP_Bool can_challenge_platform, | |
67 [in] PP_CompletionCallback callback); | |
68 | |
69 /** | |
70 * Requests a platform challenge for a given service id. | 51 * Requests a platform challenge for a given service id. |
71 * | 52 * |
72 * @param[in] service_id A <code>PP_Var</code> of type | 53 * @param[in] service_id A <code>PP_Var</code> of type |
73 * <code>PP_VARTYPE_STRING</code> containing the service_id for the challenge. | 54 * <code>PP_VARTYPE_STRING</code> containing the service_id for the challenge. |
74 * | 55 * |
75 * @param[in] challenge A <code>PP_Var</code> of type | 56 * @param[in] challenge A <code>PP_Var</code> of type |
76 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the challenge data. | 57 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the challenge data. |
77 * | 58 * |
78 * @param[out] signed_data A <code>PP_Var</code> of type | 59 * @param[out] signed_data A <code>PP_Var</code> of type |
79 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the data signed by the | 60 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the data signed by the |
(...skipping 15 matching lines...) Expand all Loading... |
95 */ | 76 */ |
96 int32_t ChallengePlatform( | 77 int32_t ChallengePlatform( |
97 [in] PP_Resource instance, | 78 [in] PP_Resource instance, |
98 [in] PP_Var service_id, | 79 [in] PP_Var service_id, |
99 [in] PP_Var challenge, | 80 [in] PP_Var challenge, |
100 [out] PP_Var signed_data, | 81 [out] PP_Var signed_data, |
101 [out] PP_Var signed_data_signature, | 82 [out] PP_Var signed_data_signature, |
102 [out] PP_Var platform_key_certificate, | 83 [out] PP_Var platform_key_certificate, |
103 [in] PP_CompletionCallback callback); | 84 [in] PP_CompletionCallback callback); |
104 }; | 85 }; |
OLD | NEW |