Open Enclave
#define OE_SET_ENCLAVE_SGX (   PRODUCT_ID,
  SECURITY_VERSION,
  ALLOW_DEBUG,
  HEAP_PAGE_COUNT,
  STACK_PAGE_COUNT,
  TCS_COUNT 
)
Value:
OE_INFO_SECTION_BEGIN \
OE_EXPORT_CONST oe_sgx_enclave_properties_t oe_enclave_properties_sgx = \
{ \
.header = \
{ \
.size = sizeof(oe_sgx_enclave_properties_t), \
.enclave_type = OE_ENCLAVE_TYPE_SGX, \
.size_settings = \
{ \
.num_heap_pages = HEAP_PAGE_COUNT, \
.num_stack_pages = STACK_PAGE_COUNT, \
.num_tcs = TCS_COUNT \
} \
}, \
.config = \
{ \
.product_id = PRODUCT_ID, \
.security_version = SECURITY_VERSION, \
.padding = 0, \
.attributes = OE_MAKE_ATTRIBUTES(ALLOW_DEBUG) \
}, \
.sigstruct = \
{ \
0 \
} \
}; \
OE_INFO_SECTION_END

Defines the SGX properties for an enclave.

The enclave properties should only be defined once for all code compiled into an enclave binary. These properties can be overwritten at sign time by the oesign tool.

Parameters
PRODUCT_IDISV assigned Product ID (ISVPRODID) to use in the enclave signature
SECURITY_VERSIONISV assigned Security Version number (ISVSVN) to use in the enclave signature
ALLOW_DEBUGIf true, allows the enclave to be created with OE_ENCLAVE_FLAG_DEBUG and debugged at runtime
HEAP_PAGE_COUNTNumber of heap pages to allocate in the enclave
STACK_PAGE_COUNTNumber of stack pages per thread to reserve in the enclave
TCS_COUNTNumber of concurrent threads in an enclave to support