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

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: More edits 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 NaClValidationCache; 14 struct NaClValidationCache;
15 class NaClValidationDB; 15 class NaClValidationDB;
16 class NaClValidationQuery; 16 class NaClValidationQuery;
17 17
18 class NaClValidationQueryContext { 18 class NaClValidationQueryContext {
19 public: 19 public:
20 NaClValidationQueryContext(NaClValidationDB* db, 20 NaClValidationQueryContext(NaClValidationDB* db,
21 const std::string& profile_key, 21 const std::string& profile_key,
22 const std::string& nacl_version); 22 const std::string& nacl_version);
23 23
24 NaClValidationQuery* CreateQuery(); 24 NaClValidationQuery* CreateQuery();
25 25
26 bool ResolveFileNonce(uint64 nonce, int32* fd, std::string* path);
27
26 private: 28 private:
27 NaClValidationDB* db_; 29 NaClValidationDB* db_;
28 30
29 // A key used by HMAC that is specific to this installation of Chrome. 31 // A key used by HMAC that is specific to this installation of Chrome.
30 std::string profile_key_; 32 std::string profile_key_;
31 33
32 // Bytes indicating the "version" of the validator being used. This is used 34 // Bytes indicating the "version" of the validator being used. This is used
33 // to implicitly invalidate the cache - changing the version will change the 35 // to implicitly invalidate the cache - changing the version will change the
34 // hashes that are produced. 36 // hashes that are produced.
35 std::string nacl_version_; 37 std::string nacl_version_;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 83
82 DISALLOW_COPY_AND_ASSIGN(NaClValidationQuery); 84 DISALLOW_COPY_AND_ASSIGN(NaClValidationQuery);
83 }; 85 };
84 86
85 // Create a validation cache interface for use by sel_ldr. 87 // Create a validation cache interface for use by sel_ldr.
86 struct NaClValidationCache* CreateValidationCache( 88 struct NaClValidationCache* CreateValidationCache(
87 NaClValidationDB* db, const std::string& profile_key, 89 NaClValidationDB* db, const std::string& profile_key,
88 const std::string& nacl_version); 90 const std::string& nacl_version);
89 91
90 #endif // CHROME_NACL_NACL_VALIDATION_QUERY_H_ 92 #endif // CHROME_NACL_NACL_VALIDATION_QUERY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698