First, here is my setup :
- My CPU is the Intel(R) Core(TM) i7-6700 CPU which is SGX capable.
- As I have an Asus Z170 Pro Gaming motherboard bought in 2015, I needed to update the bios to show the SGX option. So I did and I choose the "Software Controlled" option because the bios don't give the "Enable" option.
- Then I followed this Intel guide to install the SGX SDK and PSW.
- Windows Update did not install the SGX requirements (I forced several update checks). I checked the device manager which did not show any SGX related driver.
- I installed the Intel Management Engine for Windows 10 64bits.
- I Installed the SDK using the .exe installer I got from here: https://registrationcenter.intel.com/en/forms/?productid=2614
- I installed the PSW using the base .INF and then the SDK .INF I got from the same place I got the SDK.
- Then I created a new Enclave project in Visual Studio 2017. See attachments for EnclaveHello.cpp and EnclaveHello.edl (both in one text file because of uploads reasons).
- I added a C++ Console Application to the solution and imported the EnclaveHello.edl using the right-click menu. See attachments for AppHello.cpp.
At this point, I should mention that I do not have the choice of an Intel C++ compiler in the settings nor do I have the Intel Debugger option in the debugger field, only the Local Windows Debugger.
As my bios is configured in "Software controlled" for the SGX feature, I should call the "sgx_enable_device()" function but it is not recognized by Visual Studio.
By running the above solution (the entry point is the AppHello main()), it crashes. Here is the debug output :
'AppHello.exe' (Win32): Loaded 'E:\XXXXX\XXXX\XXXX\Dev\EnclaveHello\Debug\AppHello.exe'. Symbols loaded.
'AppHello.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'AppHello.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'AppHello.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
The thread 0x4300 has exited with code -1073741515 (0xc0000135).
The thread 0x3e90 has exited with code -1073741515 (0xc0000135).
The program '[9704] AppHello.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.
A pop-up tells me that the missing DLL is the "sgx_urts.dll".
What did I do wrong? Any ideas?
If some information is missing, I'll be glad to edit this post and provide it.
Thank you for your time!