我对新交所很陌生,想从简单的事情开始。幸运的是,我找到了这个非常基础的教程。不幸的是,尽管它很简单,但我无法让它工作。代码执行,但输出中有错误。
[sgx_create_enclavew ..\urts\win\urts.cpp:195] Couldn't open file with CreateFile()
error 0x200f, failed to create enclave.
Buffertests:
Buffer before change: Hello World!
Buffer after change: Hello World!
Stringtests:
Returned Secret:
Saved Secret: My secret string
Load Secret:
Integertests:
secretIntValue first load: 0
saved a 1337 to the enclave.
secretIntValue second load after 1337 was saved: 0
error, failed to destroy enclave.
该教程说:
如果您收到错误,SGX 找不到 enclave 文件。解决方案是将 enclave_test_save.signed.dll 移动到 app_test_save.exe 所在的同一文件夹中。
我已经尝试过了,但它并没有解决问题。
当我尝试使用以下方法创建飞地时:
sgx_create_enclave(ENCLAVE_FILE, SGX_DEBUG_FLAG, &token, &updated, &eid, NULL);
它返回:SGX_ERROR_ENCLAVE_FILE_ACCESS
问题可能是使用不同版本的 Visual Studio 造成的吗?(本教程使用 VS 2012,而我使用的是 VS 2015)