123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #include <string.h>
- #include <stdio.h>
- #include "../Enclave.h"
- #include "Enclave_t.h"
- void ecall_function_calling_convs(void)
- {
- sgx_status_t ret = SGX_ERROR_UNEXPECTED;
- char s1[] = "1234567890";
- char s2[] = "0987654321";
- char buf[BUFSIZ] = {'\0'};
- memcpy(buf, s1, strlen(s1));
- ret = memccpy(NULL, s1, s2, '\0', strlen(s1));
-
- if (ret != SGX_SUCCESS)
- abort();
- assert(memcmp(s1, s2, strlen(s1)) == 0);
- return;
- }
- void ecall_function_public(void)
- {
- sgx_status_t ret = SGX_ERROR_UNEXPECTED;
- ret = ocall_function_allow();
- if (ret != SGX_SUCCESS)
- abort();
-
- return;
- }
- int ecall_function_private(void)
- {
- return 1;
- }
|