Article ID: 000090752 Content Type: Error Messages Last Reviewed: 09/06/2022

Unable to run Intel® SGX Sample in Pre-Release Mode

Environment

Linux

Other Linux family*

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

How to configure an enclave project to run in Pre-Release mode.

Description

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
Resolution

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
Additional information

Read Intel® SGX Build Configurations for more details.

Related Products

This article applies to 1 products