/* Copyright 2013 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. */ /** * This file defines the API for platform verification. Currently, it only * supports Chrome OS. */ [generate_thunk] label Chrome { M32 = 0.2 }; /** * The PPB_PlatformVerification_Private interface allows authorized * services to verify that the underlying platform is trusted. An example of a * trusted platform is a Chrome OS device in verified boot mode. */ interface PPB_PlatformVerification_Private { /** * Create() creates a PPB_PlatformVerification_Private object. * * @pram[in] instance A PP_Instance identifying one instance of * a module. * * @return A PP_Resource corresponding to a * PPB_PlatformVerification_Private if successful, 0 if creation * failed. */ PP_Resource Create([in] PP_Instance instance); /** * IsPlatformVerification() determines if the provided resource is a * PPB_PlatformVerification_Private. * * @param[in] resource A PP_Resource corresponding to a * PPB_PlatformVerification_Private. * * @return PP_TRUE if the resource is a * PPB_PlatformVerification_Private, PP_FALSE if the * resource is invalid or some type other than * PPB_PlatformVerification_Private. */ PP_Bool IsPlatformVerification([in] PP_Resource resource); /** * Requests a platform challenge for a given service id. * * @param[in] service_id A PP_Var of type * PP_VARTYPE_STRING containing the service_id for the challenge. * * @param[in] challenge A PP_Var of type * PP_VARTYPE_ARRAY_BUFFER that contains the challenge data. * * @param[out] signed_data A PP_Var of type * PP_VARTYPE_ARRAY_BUFFER that contains the data signed by the * platform. * * @param[out] signed_data_signature A PP_Var of type * PP_VARTYPE_ARRAY_BUFFER that contains the signature of the * signed data block. * * @param[out] platform_key_certificate A PP_Var of type * PP_VARTYPE_STRING that contains the device specific * certificate for the requested service_id. * * @param[in] callback A PP_CompletionCallback to be called after * the platform challenge has been completed. This callback will only run if * the return code is PP_OK_COMPLETIONPENDING. * * @return An int32_t containing an error code from pp_errors.h. */ int32_t ChallengePlatform( [in] PP_Resource instance, [in] PP_Var service_id, [in] PP_Var challenge, [out] PP_Var signed_data, [out] PP_Var signed_data_signature, [out] PP_Var platform_key_certificate, [in] PP_CompletionCallback callback); };