OLD | NEW |
---|---|
(Empty) | |
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 | |
3 * found in the LICENSE file. | |
4 */ | |
5 | |
6 /** | |
7 * This file defines the API for platform verification. Currently, it only | |
8 * supports Chrome OS. | |
9 */ | |
10 | |
11 [generate_thunk] | |
12 | |
13 label Chrome { | |
14 M31 = 0.1 | |
15 }; | |
16 | |
17 /** | |
18 * The <code>PPB_PlatformVerification_Private</code> interface allows authorized | |
19 * services to verify that the underlying platform is trusted. An example of | |
dmichael (off chromium)
2013/09/09 15:54:21
Would it be worthwhile to expand on what you mean
DaleCurtis
2013/09/09 20:49:14
I believe the current text is sufficient. I'm hesi
| |
20 * a trusted platform is a Chromebook in verified boot mode. | |
dmichael (off chromium)
2013/09/09 15:54:21
s/a Chromebook/ChromeOS
?
since not all ChromeOS d
DaleCurtis
2013/09/09 20:49:14
Done.
| |
21 */ | |
22 | |
23 interface PPB_PlatformVerification_Private { | |
24 /** | |
25 * Create() creates a <code>PPB_PlatformVerification_Private</code> object. | |
26 * | |
27 * @pram[in] instance A <code>PP_Instance</code> identifying one instance of | |
28 * a module. | |
29 * | |
30 * @return A <code>PP_Resource</code> corresponding to a | |
31 * <code>PPB_PlatformVerification_Private</code> if successful, 0 if creation | |
32 * failed. | |
33 */ | |
34 PP_Resource Create([in] PP_Instance instance); | |
35 | |
36 /** | |
37 * IsPlatformVerification() determines if the provided resource is a | |
38 * <code>PPB_PlatformVerification_Private</code>. | |
39 * | |
40 * @param[in] resource A <code>PP_Resource</code> corresponding to a | |
41 * <code>PPB_PlatformVerification_Private</code>. | |
42 * | |
43 * @return <code>PP_TRUE</code> if the resource is a | |
44 * <code>PPB_PlatformVerification_Private</code>, <code>PP_FALSE</code> if the | |
45 * resource is invalid or some type other than | |
46 * <code>PPB_PlatformVerification_Private</code>. | |
47 */ | |
48 PP_Bool IsPlatformVerification([in] PP_Resource resource); | |
49 | |
50 /* Whether the platform can be challenged and is expected to pass. | |
51 */ | |
dmichael (off chromium)
2013/09/09 15:54:21
nit: Please use the same comment format as the oth
DaleCurtis
2013/09/09 20:49:14
Done.
| |
52 PP_Bool CanChallengePlatform([in] PP_Resource instance); | |
dmichael (off chromium)
2013/09/09 15:54:21
This doesn't seem strictly necessary. Is this basi
DaleCurtis
2013/09/09 20:49:14
Yes, kind of, it avoids both the cost of creating
| |
53 | |
54 /** | |
55 * Requests a platform challenge for a given service id. | |
dmichael (off chromium)
2013/09/09 15:54:21
Do you have any public documentation giving more d
DaleCurtis
2013/09/09 20:49:14
For ChromeOS it's just n bits of nonce data; which
| |
56 * | |
57 * @param[in] service_id A <code>PP_Var</code> of type | |
58 * <code>PP_VARTYPE_STRING</code> containing the service_id for the challenge. | |
59 * | |
60 * @param[in] challenge A <code>PP_Var</code> of type | |
61 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the challenge data. | |
DaleCurtis
2013/09/06 21:49:32
One PPAPI Q I have is whether it's worth having th
dmichael (off chromium)
2013/09/09 15:54:21
tl;dr: ArrayBuffer vars seem like the right choic
DaleCurtis
2013/09/09 20:49:14
Thanks for the detailed answer.
| |
62 * | |
63 * @param[out] signed_data A <code>PP_Var</code> of type | |
64 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the data signed by the | |
65 * platform. | |
66 * | |
67 * @param[out] signed_data_signature A <code>PP_Var</code> of type | |
68 * <code>PP_VARTYPE_ARRAY_BUFFER</code> that contains the signature of the | |
69 * signed data block. | |
70 * | |
71 * @param[out] platform_key_certificate A <code>PP_Var</code> of type | |
72 * <code>PP_VARTYPE_STRING</code> that contains the device specific | |
73 * certificate for the requested service_id. | |
74 * | |
75 * @param[in] callback A <code>PP_CompletionCallback</code> to be called after | |
76 * the platform challenge has been completed. This callback will only run if | |
77 * the return code is <code>PP_OK_COMPLETIONPENDING</code>. | |
78 * | |
79 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | |
80 */ | |
81 int32_t ChallengePlatform( | |
82 [in] PP_Resource instance, | |
83 [in] PP_Var service_id, | |
84 [in] PP_Var challenge, | |
85 [out] PP_Var signed_data, | |
86 [out] PP_Var signed_data_signature, | |
87 [out] PP_Var platform_key_certificate, | |
88 [in] PP_CompletionCallback callback); | |
89 }; | |
OLD | NEW |