Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.
1554 ディスカッション

Passing Variables and Objects Between App and Enclave

Aziz_A_
ビギナー
1,681件の閲覧回数

Hello, 

Every tutorial I've seen on SGX seems to only pass Strings in the ECALLs and OCALLs between the App and the Enclave.

Is it possible to pass other types of variables? can I pass objects? if not what would be the best way to get around that?

Thanks.

 

0 件の賞賛
1 返信
Anusha_K_Intel
従業員
1,681件の閲覧回数

Hi Aziz A,

C++ objects are not supported in enclave interface definitions. If an application needs to pass a C++ object across the enclave boundary, you are recommended to store the C++ object’s data in a C struct and marshal the data across the enclave interface. Then you need to instantiate the C++ object inside the enclave with the marshaled C struct passed in to the constructor (or you may update existing instantiated objects with appropriate operators). 

The EDL for passing structures is given here

 

Regards,

Anusha.

 

返信