mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-12 04:31:14 +00:00

Current SGX lib-rats wasm module hash is stored in a global buffer, which may be overwritten if there are multiple wasm module loadings. We move the module hash into the enclave module to resolve the issue. And rename the SGX_IPFS macro/variable in Makefile and Enclave.edl to make the code more consistent. And refine the sgx-ra sample document.
35 lines
1007 B
Plaintext
35 lines
1007 B
Plaintext
/*
|
|
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
*/
|
|
|
|
#define WASM_ENABLE_SGX_IPFS 0
|
|
#define WASM_ENABLE_LIB_RATS 0
|
|
|
|
enclave {
|
|
from "sgx_tstdc.edl" import *;
|
|
from "sgx_pthread.edl" import *;
|
|
from "sgx_wamr.edl" import *;
|
|
#if WASM_ENABLE_LIB_RATS != 0
|
|
from "rats.edl" import *;
|
|
from "sgx_tsgxssl.edl" import *;
|
|
#endif
|
|
#if WASM_ENABLE_SGX_IPFS != 0
|
|
from "sgx_tprotected_fs.edl" import *;
|
|
#endif
|
|
|
|
trusted {
|
|
/* define ECALLs here. */
|
|
public void ecall_handle_command(unsigned cmd,
|
|
[in, out, size=cmd_buf_size]uint8_t *cmd_buf,
|
|
unsigned cmd_buf_size);
|
|
public void ecall_iwasm_main([user_check]uint8_t *wasm_file_buf,
|
|
uint32_t wasm_file_size);
|
|
};
|
|
|
|
untrusted {
|
|
/* define OCALLs here. */
|
|
int ocall_print([in, string]const char* str);
|
|
};
|
|
};
|