- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This is the trusted part of my Enclave.edl file:
enclave {
include "sharedTypes.h"
from "sgx_tstdc.edl" import *;
from "sgx_pthread.edl" import *;
trusted {
public void ecall_init();
public void ecall_file_init([in, string] const char *fileName,[out] Tag *tag,[out, size=10, count=numBlocks] uint8_t **sigma, int numBlocks);
And this is where the function ecall_file_init is called:
void app_file_init(sgx_enclave_id_t eid, const char *fileName, int numBlocks) {
// Initialize tag and sigma
Tag tag;
// First, allocate memory for the array of pointers
uint8_t **sigma = malloc(numBlocks * sizeof(uint8_t *));
// Then, allocate memory for each block of memory that each pointer points to
for (int i = 0; i < numBlocks; i++) {
sigma[i] = malloc((PRIME_LENGTH /
// Initialize each block of memory to 0
memset(sigma[i], 0, (PRIME_LENGTH /
}
sgx_status_t status;
// Call ecall_file_init to initialize tag and sigma
status = ecall_file_init(eid, fileName, &tag, sigma, numBlocks);
if (status != SGX_SUCCESS) {
printf("Error calling enclave function: %d\n", status);
return;
}
The Tag typedef struct:
typedef struct Tag {
int n;
uint8_t prfKey[KEY_SIZE];
uint8_t alpha[PAGE_PER_BLOCK][PRIME_LENGTH / 8];
uint8_t MAC[MAC_SIZE];
} Tag;
I am getting error #2 which indicates I am passing something into the ecall incorreclty. I suspect that it has something to do with tag. Any things I can try or solutions?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi jdafoe,
Thank you for your interest in Intel® SGX.
As I am looking around for error #2, could you share the screenshot of this error?
May I know what is your use cases in this status? -> status = ecall_file_init(eid, fileName, &tag, sigma, numBlocks);
Looking forward to hearing from you.
Regards,
Ken
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi jdafoe,
I would like to follow up with you if you can share the screenshot of error #2 to assist your issue further.
Looking forward to hearing from you.
Thank you.
Regards,
Ken
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have since figured out the issue. It turned out to be unrelated to the typedef struct.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi jdafoe,
I am glad to see that the issues that you faced have been solved.
This thread has been marked as solved and Intel will no longer monitor this thread. If you want a response from Intel in a follow-up question, please open a new thread.
Regards,
Ken
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page