You can refer to the below file for the usage of sgx_seal_data_ex.
SGX_KEYPOLICY_MRSIGNER and SGX_KEYPOLICY_MRENCLAVE are defined in sgx_key.h
The syntax for the function is as follows
const uint16_t key_policy,
const sgx_attributes_t attribute_mask,
const sgx_misc_select_t misc_mask,
const uint32_t additional_MACtext_length,
const uint8_t * p_additional_MACtext,
const uint32_t text2encrypt_length,
const uint8_t * p_text2encrypt,
const uint32_t sealed_data_size,
sgx_sealed_data_t * p_sealed_data
In the sample code of sealed Data application we can see the usage of sgx_seal_data() function but sgx_seal_data_ex() is not used.You can see that code for reference.
The value of key_policy should be given as to 0x0001 to use the enclave's measurement register.
You need to add sgx_tseal.h as your header file and sgx_tservice.lib as your library.
More information regarding the function is given here: https://software.intel.com/en-us/node/709129
So I define my function and internally define parameters for the sgx_seal_data_ex. The parameters i defined in my function seem to be lost. So if i have to pass all the arguments for seal_data_ex into my function its not clear how this should be defined in the .edl file. The documentation for .edl files does not say what the convention is for square brackets .