App.cpp 281 B

12345678910111213141516171819
  1. #include <cstdio>
  2. #include "sgx_urts.h"
  3. #include "Untrusted.hpp"
  4. int main(int argc, char **argv)
  5. {
  6. char buf[30];
  7. if (initialize_enclave() < 0) {
  8. return -1;
  9. }
  10. ecall_hello_enclave(buf, sizeof(buf));
  11. puts(buf);
  12. sgx_destroy_enclave(global_eid);
  13. }