| OLD | NEW |
| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 NaClValidationQuery(NaClValidationDB* db, const std::string& profile_key); | 44 NaClValidationQuery(NaClValidationDB* db, const std::string& profile_key); |
| 45 | 45 |
| 46 void AddData(const char* data, size_t length); | 46 void AddData(const char* data, size_t length); |
| 47 void AddData(const unsigned char* data, size_t length); | 47 void AddData(const unsigned char* data, size_t length); |
| 48 void AddData(const base::StringPiece& data); | 48 void AddData(const base::StringPiece& data); |
| 49 | 49 |
| 50 int QueryKnownToValidate(); | 50 int QueryKnownToValidate(); |
| 51 | 51 |
| 52 void SetKnownToValidate(); | 52 void SetKnownToValidate(); |
| 53 | 53 |
| 54 NaClValidationQueryContext* context_; | |
| 55 | |
| 56 private: | 54 private: |
| 57 enum QueryState { | 55 enum QueryState { |
| 58 READY, | 56 READY, |
| 59 GET_CALLED, | 57 GET_CALLED, |
| 60 SET_CALLED | 58 SET_CALLED |
| 61 }; | 59 }; |
| 62 | 60 |
| 63 // The HMAC interface currently does not support incremental signing. To work | 61 // The HMAC interface currently does not support incremental signing. To work |
| 64 // around this, each piece of data is signed and the signature is added to a | 62 // around this, each piece of data is signed and the signature is added to a |
| 65 // buffer. If there is not enough space in the buffer to accommodate new | 63 // buffer. If there is not enough space in the buffer to accommodate new |
| (...skipping 18 matching lines...) Expand all Loading... |
| 84 | 82 |
| 85 DISALLOW_COPY_AND_ASSIGN(NaClValidationQuery); | 83 DISALLOW_COPY_AND_ASSIGN(NaClValidationQuery); |
| 86 }; | 84 }; |
| 87 | 85 |
| 88 // Create a validation cache interface for use by sel_ldr. | 86 // Create a validation cache interface for use by sel_ldr. |
| 89 struct NaClValidationCache* CreateValidationCache( | 87 struct NaClValidationCache* CreateValidationCache( |
| 90 NaClValidationDB* db, const std::string& profile_key, | 88 NaClValidationDB* db, const std::string& profile_key, |
| 91 const std::string& nacl_version); | 89 const std::string& nacl_version); |
| 92 | 90 |
| 93 #endif // CHROME_NACL_NACL_VALIDATION_QUERY_H_ | 91 #endif // CHROME_NACL_NACL_VALIDATION_QUERY_H_ |
| OLD | NEW |