Open Enclave
oe_result_t oe_get_report ( uint32_t  flags,
const uint8_t *  report_data,
size_t  report_data_size,
const void *  opt_params,
size_t  opt_params_size,
uint8_t *  report_buffer,
size_t *  report_buffer_size 
)

Get a report signed by the enclave platform for use in attestation.

This function creates a report to be used in local or remote attestation. The report shall contain the data given by the report_data parameter.

If the report_buffer is NULL or report_size parameter is too small, this function returns OE_BUFFER_TOO_SMALL.

Parameters
flagsSpecifying default value (0) generates a report for local attestation. Specifying OE_REPORT_FLAGS_REMOTE_ATTESTATION generates a report for remote attestation.
report_dataThe report data that will be included in the report.
report_data_sizeThe size of the report_data in bytes.
opt_paramsOptional additional parameters needed for the current enclave type. For SGX, this can be sgx_target_info_t for local attestation.
opt_params_sizeThe size of the opt_params buffer.
report_bufferThe buffer to where the resulting report will be copied.
report_buffer_sizeThe size of the report buffer. This is set to the required size of the report buffer on return.
Return values
OE_OKThe report was successfully created.
OE_INVALID_PARAMETERAt least one parameter is invalid.
OE_BUFFER_TOO_SMALLThe report_buffer buffer is NULL or too small.
OE_OUT_OF_MEMORYFailed to allocate memory.