How to configure an enclave project to run in Pre-Release mode.
Running Intel® SGX SDK SealUnseal sample in pre-release mode on a system without Intel® SGX and receiving error code 0x4004. Ran the sample with the following configurations:
- Set disable debug flag to 1
- Passed 0 as second parameter of SGX_Create_Enclave
- Ran makefile with: SGX_PRERELEASE=1, SGX_DEBUG=0, SGX_MODE=HW
The 4004 error code is a permission error because the enclave was not authorized to run. To run the SealUnseal sample in pre-release mode, make the following changes:
- Set DisableDebug flag to 0 in enclave.config.xml
- Call sgx_create_enclave with SGX_DEBUG_FLAG as the second argument. (The value of SGX_DEBUG_FLAG is determined by macros in the makefile set by the SGX_PRERELEASE and SGX_DEBUG flags).
- Set SGX_PRERELEASE=1 and SGX_DEBUG=0
Read Intel® SGX Build Configurations for more details.