OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. |
| 5 */ |
| 6 |
| 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_CACHING_VALIDATION_SIGNATURE_H_ |
| 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_CACHING_VALIDATION_SIGNATURE_H_ |
| 9 |
| 10 #include "native_client/src/include/nacl_base.h" |
| 11 #include "native_client/src/trusted/validator/cpufeatures.h" |
| 12 |
| 13 EXTERN_C_BEGIN |
| 14 |
| 15 struct HashingInterface; |
| 16 |
| 17 #define VALIDATION_SIGNATURE_MAX_LENGTH 32 |
| 18 |
| 19 typedef struct { |
| 20 const unsigned char *key; |
| 21 unsigned int key_length; |
| 22 const char *isa; |
| 23 const char *version; |
| 24 NaClCPUFeatures *cpu_features; |
| 25 } ValidationInfo; |
| 26 |
| 27 typedef struct { |
| 28 unsigned char data[VALIDATION_SIGNATURE_MAX_LENGTH]; |
| 29 unsigned int length; |
| 30 } ValidationSignature; |
| 31 |
| 32 void GetValidationSignature(const HashingInterface *hashing, |
| 33 const ValidationInfo *info, |
| 34 const unsigned char *code, |
| 35 unsigned int code_length, |
| 36 ValidationSignature *sig); |
| 37 |
| 38 EXTERN_C_END |
| 39 |
| 40 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_CACHING_VALIDATION_SIGNATURE_H_ */ |
OLD | NEW |