Comments (14)
You'll also need to link libmbedtls_sgx_t.a
to your enclave.
from mbedtls-sgx.
Sorry, looks like I made a typo in the original comment. I have already linked libmbedtls_sgx_t.a
to my enclave.
from mbedtls-sgx.
First of all, make sure to use the up-to-date master. Can you do the following and see if the problem persists?
mkdir build
cd build && cmake .. && make -j && make install
You'll get
mbedtls_SGX-2.6.0
├── include
│ └── mbedtls
└── lib
├── libmbedtls_SGX_t.a
├── libmbedtls_SGX_u.a
└── mbedtls_SGX.edl
Then link libmbedtls_SGX_t.a
to your enclave.
from mbedtls-sgx.
Could you also report the output of nm libmbedtls_SGX_t.a | grep dummy
? Mine is
$ nm libmbedtls_SGX_t.a | grep dummy
00000000000006df t entropy_dummy_source
000000000000c75b t ssl_cookie_check_dummy
000000000000c73c t ssl_cookie_write_dummy
U dummy
0000000000000000 t sgx_dummy
dummy.c.o:
0000000000000000 T dummy
from mbedtls-sgx.
The issue still persists.
nm libmbedtls_SGX_t.a | grep dummy
U dummy
0000000000000000 t sgx_dummy
00000000000006df t entropy_dummy_source
000000000000c701 t ssl_cookie_check_dummy
000000000000c6e2 t ssl_cookie_write_dummy
from mbedtls-sgx.
Seems like dummy.c
somehow is not compiled? Can you do a clean build (i.e. deleting everything in the build dir) and see what's the output of make -Bn | grep dummy
?
from mbedtls-sgx.
/usr/bin/cmake -E cmake_echo_color --switch= --green --progress-dir=/home/vagrant/shared/xchange/mbedtls-SGX/build/CMakeFiles --progress-num=75 "Building C object trusted/CMakeFiles/mbedtls_SGX_t.dir/dummy.c.o"
cd /home/vagrant/shared/xchange/mbedtls-SGX/build/trusted && /usr/bin/cc -I/home/vagrant/shared/xchange/mbedtls-SGX/trusted/ -I/home/vagrant/shared/xchange/mbedtls-SGX/trusted/mbedtls-2.6.0/include -I/opt/intel/sgxsdk/include -I/opt/intel/sgxsdk/include/tlibc -I/opt/intel/sgxsdk/include/stlport -DDEBUG -UNDEBUG -UEDEBUG -m64 -O0 -g -nostdinc -fvisibility=hidden -fpie -fstack-protector -o CMakeFiles/mbedtls_SGX_t.dir/dummy.c.o -c /home/vagrant/shared/xchange/mbedtls-SGX/trusted/dummy.c
from mbedtls-sgx.
That seems fine. Can you compile the examples?
from mbedtls-sgx.
Yes, the examples compile.
from mbedtls-sgx.
Did you import the EDL file?
from mbedtls-sgx.
Yes, in my own EDL file I have from "../mbedtls-SGX/trusted/mbedtls_SGX.edl" import *;
from mbedtls-sgx.
Okay. If the examples compile, then the library is fine. I’ll need more source code to debug.
from mbedtls-sgx.
It is probably an issue with my linking then.
from mbedtls-sgx.
So I took a look at your Makefile. The crux of the problem is you have to link mbedtls in a group with SGX libs.
-Wl,--start-group $(Mbedtls_SGX_t_Library_Name) -lsgx_tstdc -lsgx_tcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group
from mbedtls-sgx.
Related Issues (14)
- Multiple definition of `g_ecall_table', `g_dyn_entry_table' .. HOT 2
- sgx_emmt shows 0KB for multi-threaded server.
- unable to verify the first certificate
- Security issue: missing return value check when invoking `ocall_mbedtls_net_accept` HOT 1
- [Security] Information leak mbedtls_ssl_flush_output() HOT 2
- [Security]
- Data races
- Does mbedtls-SGX support AES-NI?
- SSL - Hardware acceleration function returned with error : UNKNOWN ERROR CODE (0015)
- Several Bugs HOT 2
- Performing remote attestation HOT 7
- Missing dependency when building examples HOT 1
- 0x1007 : SGX_ERROR_ECALL_NOT_ALLOWED
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mbedtls-sgx.