Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.
1448 Discussions

signing the enclave fail when enclane connect to MySQL database.

enclave_Research
1,291 Views

Enclave connection MySQL database compilation prompt enclave contains an import table.The details are as follows:

EXEC : warning : The enclave contains an import table.
1>The input enclave file is not correct.
1>Error happened while signing the enclave.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(138,5): error MSB3073: 命令“"D:\sgx\SGXSDK\bin\win32\release\sgx_sign.exe" sign -key "D:\VS-Work\Enclavem\Enclavem\Enclavem_private.pem" -enclave "D:\VS-Work\Enclavem\Debug\Enclavem.dll" -out "D:\VS-Work\Enclavem\Debug\Enclavem.signed.dll" -config "D:\VS-Work\Enclavem\Enclavem\Enclavem.config.xml
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(138,5): error MSB3073: :VCEnd”已退出,代码为 -1。
1>已完成生成项目“Enclavem.vcxproj”的操作 - 失败。

What should I do for this?Thanks

0 Kudos
1 Solution
JesusG_Intel
Moderator
1,262 Views

Hello enclave_Research,


Since the database access library is untrusted, it cannot be called directly from inside the enclave. Instead, you can create interface functions in your untrusted app that access the database. Then create ocall into the untrusted interface functions. The enclave indirectly accesses the database via ocalls to the interface functions in your untrusted app.


View solution in original post

4 Replies
JesusG_Intel
Moderator
1,282 Views

Hello encalve_Research,


This error occurs when trying to sign an enclave DLL that has been dynamically linked to a library. Enclaves can only be statically linked. Please see page 56, section Linking Enclave with Libraries, of the SGX SDK Wihdows Developer Reference, https://software.intel.com/content/www/us/en/develop/download/sgx-sdk-developer-reference-windows.html.


enclave_Research
1,272 Views
Thank you for your reply. The static library I'm connected to is libmysql.lib.But it's not in a trusted library.Can't connect libmysql.lib?Can't access database be placed in trusted encalve?
0 Kudos
JesusG_Intel
Moderator
1,263 Views

Hello enclave_Research,


Since the database access library is untrusted, it cannot be called directly from inside the enclave. Instead, you can create interface functions in your untrusted app that access the database. Then create ocall into the untrusted interface functions. The enclave indirectly accesses the database via ocalls to the interface functions in your untrusted app.


JesusG_Intel
Moderator
1,255 Views

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.


0 Kudos
Reply