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

Side by Side Diff: chrome/nacl/nacl_validation_query.h

Issue 14750007: NaCl: enable meta-based validation for shared libraries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_NACL_NACL_VALIDATION_QUERY_H_ 5 #ifndef CHROME_NACL_NACL_VALIDATION_QUERY_H_
6 #define CHROME_NACL_NACL_VALIDATION_QUERY_H_ 6 #define CHROME_NACL_NACL_VALIDATION_QUERY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/strings/string_piece.h" 11 #include "base/strings/string_piece.h"
12 #include "crypto/hmac.h" 12 #include "crypto/hmac.h"
13 13
14 struct NaClFileToken;
14 struct NaClValidationCache; 15 struct NaClValidationCache;
15 class NaClValidationDB; 16 class NaClValidationDB;
16 class NaClValidationQuery; 17 class NaClValidationQuery;
17 18
18 class NaClValidationQueryContext { 19 class NaClValidationQueryContext {
19 public: 20 public:
20 NaClValidationQueryContext(NaClValidationDB* db, 21 NaClValidationQueryContext(NaClValidationDB* db,
21 const std::string& profile_key, 22 const std::string& profile_key,
22 const std::string& nacl_version); 23 const std::string& nacl_version);
23 24
24 NaClValidationQuery* CreateQuery(); 25 NaClValidationQuery* CreateQuery();
25 26
27 bool ResolveFileToken(struct NaClFileToken* file_token, int32* fd,
28 std::string* path);
29
26 private: 30 private:
27 NaClValidationDB* db_; 31 NaClValidationDB* db_;
28 32
29 // A key used by HMAC that is specific to this installation of Chrome. 33 // A key used by HMAC that is specific to this installation of Chrome.
30 std::string profile_key_; 34 std::string profile_key_;
31 35
32 // Bytes indicating the "version" of the validator being used. This is used 36 // Bytes indicating the "version" of the validator being used. This is used
33 // to implicitly invalidate the cache - changing the version will change the 37 // to implicitly invalidate the cache - changing the version will change the
34 // hashes that are produced. 38 // hashes that are produced.
35 std::string nacl_version_; 39 std::string nacl_version_;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 85
82 DISALLOW_COPY_AND_ASSIGN(NaClValidationQuery); 86 DISALLOW_COPY_AND_ASSIGN(NaClValidationQuery);
83 }; 87 };
84 88
85 // Create a validation cache interface for use by sel_ldr. 89 // Create a validation cache interface for use by sel_ldr.
86 struct NaClValidationCache* CreateValidationCache( 90 struct NaClValidationCache* CreateValidationCache(
87 NaClValidationDB* db, const std::string& profile_key, 91 NaClValidationDB* db, const std::string& profile_key,
88 const std::string& nacl_version); 92 const std::string& nacl_version);
89 93
90 #endif // CHROME_NACL_NACL_VALIDATION_QUERY_H_ 94 #endif // CHROME_NACL_NACL_VALIDATION_QUERY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698