- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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()
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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)
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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!!
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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.

- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable