- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I would like to use an enclave in a Windows Forms Application (C#). Is it possible to do it ? Can I wrap an enclave library in another library ?
Thanks
Charlotte
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you can load enclaves in your C# application. Use whatever mechanism you normally use to call native C functions (sgx_create_enclavew) in non-managed DLLs (sgx_urts.dll).
Note that in the 1.1 version of the our runtime you may run into an issue (that has since been fixed) with COM thread initialization.
Basically, you will need to set the threading type of your C# Main function to [STAThread]. See below for an example.
…
[STAThread]
static void Main(string[] args)
…
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Charlotte,
SGX application has dependency, we can build SGX enclave on C, C++ language only.
If external applications(JAVA,C# etc) wants to use SGX enclave, then developer need to create additional layer to communicate with SGX enclave. It increases application complexity and potentially increases the attack surface.
Thanks and Regards,
Surenthar Selvaraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you can load enclaves in your C# application. Use whatever mechanism you normally use to call native C functions (sgx_create_enclavew) in non-managed DLLs (sgx_urts.dll).
Note that in the 1.1 version of the our runtime you may run into an issue (that has since been fixed) with COM thread initialization.
Basically, you will need to set the threading type of your C# Main function to [STAThread]. See below for an example.
…
[STAThread]
static void Main(string[] args)
…
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page