Check error conditions for loading enclave */
| 106 | |
| 107 | /* Check error conditions for loading enclave */ |
| 108 | void print_error_message(sgx_status_t ret) |
| 109 | { |
| 110 | size_t idx = 0; |
| 111 | size_t ttl = sizeof sgx_errlist/sizeof sgx_errlist[0]; |
| 112 | |
| 113 | for (idx = 0; idx < ttl; idx++) { |
| 114 | if(ret == sgx_errlist[idx].err) { |
| 115 | if(NULL != sgx_errlist[idx].sug) |
| 116 | printf("Info: %s\n", sgx_errlist[idx].sug); |
| 117 | printf("Error: %s\n", sgx_errlist[idx].msg); |
| 118 | break; |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | if (idx == ttl) |
| 123 | printf("Error code is 0x%X. Please refer to the \"Intel SGX SDK Developer Reference\" for more details.\n", ret); |
| 124 | } |
| 125 | |
| 126 | |
| 127 | unsigned long int initialize_enclave() |
no test coverage detected