- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
Is it possible to run sgx enclave from dll? I have got an .exe application (untrusted module ) that call sgx_create_enclave() and also can call functions from the enclave. But I want to put this untrusted module in different process as dll (so I want this structure: dll (untrusted module) runs dll (enclave)). But it isn't work now... The thread with my LoadLibrary frozes on sgx_create_enclave()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Nadia,
I was able to create an untrusted dll, that interfaces with the enclave, and linked the unstrusted dll with a regular console app and it all worked. I did not use LoadLibrary. Attached are the solution files for your reference. I used absolute paths in the Properties so you will have to modify them.
The Untrusted solution contains the Untrusted DLL project and the SGXSDK/SampleEnclave/Enclave project.
Make sure to copy your untrusted dll and enclave.signed.dll to the same location as hello.exe. Set the Debugging/Working Directory to $(OutDir).
I copied the contents from SampleEnclave/app.cpp to Untrusted/dllmain.cpp.
Good luck!
Sincerely,
Jesus G.
Intel Customer Support
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello nadia111,
Please describe how you setup the Visual Studio solution for your three projects: the main untrusted executable app, the untrusted dll, and the enclave dll.
Provide:
Screenshots of project properties for C/C++ and Linker.
Screenshot of the solution tree with the projects expanded.
Sincerely,
Jesus G.
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Sure. "hello" project is a project with a printing string. In hello.exe I want to inject sgxConsoleApplication.dll (right side). I do injection of sgxConsoleApplication.dll to hello.exe with LoadLibrary.
hello project (the main untrusted executable app)
sgxConsoleApplication (the untrusted dll)
EnclaveTest (the enclave dll)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the comprehensive details, Nadia. I am investigating your issue and will respond when I have something useful for you.
Sincerely,
Jesus G.
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Nadia,
I was able to create an untrusted dll, that interfaces with the enclave, and linked the unstrusted dll with a regular console app and it all worked. I did not use LoadLibrary. Attached are the solution files for your reference. I used absolute paths in the Properties so you will have to modify them.
The Untrusted solution contains the Untrusted DLL project and the SGXSDK/SampleEnclave/Enclave project.
Make sure to copy your untrusted dll and enclave.signed.dll to the same location as hello.exe. Set the Debugging/Working Directory to $(OutDir).
I copied the contents from SampleEnclave/app.cpp to Untrusted/dllmain.cpp.
Good luck!
Sincerely,
Jesus G.
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I made edits to my project using your sample and it works (yes, it is a "Sucdddess"). I'm so happy! Thank you very much for your time and help!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm very glad you got it working, Nadia.
This thread has been marked as answered 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.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page