Open Enclave  0.6.x
oe_result_t oe_create_enclave ( const char *  path,
oe_enclave_type_t  type,
uint32_t  flags,
const void *  config,
uint32_t  config_size,
const oe_ocall_func_t ocall_table,
uint32_t  ocall_table_size,
oe_enclave_t **  enclave 
)

Create an enclave from an enclave image file.

This function creates an enclave from an enclave image file. On successful return, the enclave is fully initialized and ready to use.

Parameters
pathThe path of an enclave image file in ELF-64 format. This file must have been linked with the oecore library and signed by the oesign tool.
typeThe type of enclave supported by the enclave image file.
  • OE_ENCLAVE_TYPE_SGX - An SGX enclave
flagsThese flags control how the enclave is run. It is the bitwise OR of zero or more of the following flags
  • OE_ENCLAVE_FLAG_SIMULATE - runs the enclave in simulation mode
  • OE_ENCLAVE_FLAG_DEBUG - runs the enclave in debug mode. DO NOT SHIP CODE with this flag
configAdditional enclave creation configuration data for the specific enclave type. This parameter is reserved and must be NULL.
config_sizeThe size of the config data buffer in bytes.
ocall_tablePointer to table of ocall functions generated by oeedger8r.
ocall_table_sizeThe size of the ocall_table.
enclaveThis points to the enclave instance upon success.
Returns
Returns OE_OK on success.