Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Unified Diff: ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h

Issue 14683004: Check that the PNaCl cache hash is truly derived from the bitcode content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h
diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h
index 784b8c7edbd0f5892c6c22a16f318914099e352c..f2b2d548fd3372b747bf992e6d524247c7d12eb9 100644
--- a/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h
+++ b/ppapi/native_client/src/trusted/plugin/pnacl_coordinator.h
@@ -26,6 +26,7 @@
#include "native_client/src/trusted/plugin/pnacl_resources.h"
#include "ppapi/c/pp_file_info.h"
+#include "ppapi/c/private/ppb_nacl_hash_private.h"
#include "ppapi/c/trusted/ppb_file_io_trusted.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/file_io.h"
@@ -181,6 +182,8 @@ class PnaclCoordinator: public CallbackSource<FileStreamData> {
// Invoked when translation is finished.
void TranslateFinished(int32_t pp_error);
+ bool BitcodeHashMatchesContents();
+
// If the cache is enabled, open a cache file for write, then copy
// the nexe data from temp_nexe_file_ to> cached_nexe_file_.
// Once the copy is done, we commit it to the cache by renaming the
@@ -269,6 +272,10 @@ class PnaclCoordinator: public CallbackSource<FileStreamData> {
// Keep this last in declaration order to ensure the other variables
// haven't been destroyed yet when its destructor runs.
nacl::scoped_ptr<PnaclTranslateThread> translate_thread_;
+
+ // Interface and state for bitcode hash verification.
+ const PPB_NaCl_Hash_Private* nacl_hash_private_interface_;
+ void* bitcode_hash_verifier_;
};
//----------------------------------------------------------------------
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin_error.h ('k') | ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698