Community
cancel
Showing results for 
Search instead for 
Did you mean: 
tz71
Beginner
160 Views

Problem using Classes inside enclave

Jump to solution

I want to write a class inside enclave. I couldn't find any sample code about it. Is there any special syntax for defining Class functions, Constructors and Destructors in edl files? I tried to define them as trusted using the same syntax as regular functions but I'm getting "Invalid token" error. Can someone give me an example of using classes inside a enclave?

Thanks,

0 Kudos
1 Solution
Mark_S_Intel2
Employee
160 Views

While you may use C++ classes inside an enclave, EDL will not allow you to define trusted functions as class methods.  The ECall Bridge functions (functions which the Edger8r generated code calls for you  when you enter the enclave) must be native C and will subsequently call C functions that you must implement.  The C function that you implement may subsequently make a call to a class method within a class that you have instantiated within the enclave.

EDL also does not support passing class objects across enclave boundaries.

View solution in original post

1 Reply
Mark_S_Intel2
Employee
161 Views

While you may use C++ classes inside an enclave, EDL will not allow you to define trusted functions as class methods.  The ECall Bridge functions (functions which the Edger8r generated code calls for you  when you enter the enclave) must be native C and will subsequently call C functions that you must implement.  The C function that you implement may subsequently make a call to a class method within a class that you have instantiated within the enclave.

EDL also does not support passing class objects across enclave boundaries.

View solution in original post

Reply