[Assignment-7] Add License / Copy Notices

This commit is contained in:
Paul Zinselmeyer 2024-07-08 09:41:14 +02:00 committed by saschato
parent f54a8e5567
commit 445e42f4d3
5 changed files with 29 additions and 7 deletions

View file

@ -39,13 +39,20 @@ void syntax_exit(void) {
void set_bin_name(char* bin_name) {
BIN_NAME = bin_name;
}
/*
* This definition is copied from the provided SGX Examples.
* The specified License applies.
*/
typedef struct _sgx_errlist_t {
sgx_status_t err;
const char *msg;
const char *sug; /* Suggestion */
} sgx_errlist_t;
/*
* This definition is copied from the provided SGX Examples.
* The specified License applies.
*/
/* Error code returned by sgx_create_enclave */
static sgx_errlist_t sgx_errlist[] = {
{
@ -124,7 +131,10 @@ static sgx_errlist_t sgx_errlist[] = {
NULL
},
};
/*
* This Method is copied from the provided SGX Examples.
* The specified License applies.
*/
/* Check error conditions for loading enclave */
void sgx_print_error_message(sgx_status_t ret)
{
@ -139,11 +149,15 @@ void sgx_print_error_message(sgx_status_t ret)
break;
}
}
if (idx == ttl)
printf("Error code is 0x%X. Please refer to the \"Intel SGX SDK Developer Reference\" for more details.\n", ret);
}
/*
* This Method is copied from the provided SGX Examples.
* The specified License applies.
*/
int initialize_enclave(char* token_path) {
FILE* sgx_token_file = NULL;
sgx_launch_token_t token = {0};