- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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()
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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 kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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)
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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!!
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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.

- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite