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

Create a library to be used by an application

Medina_Chirinos__Jor
315 Views

Hi Dear all,

I am a beginner in SGX applications. I created an SGX project, a trusted part where my critical and sensitive data is kept and an untrusted part with functions that call the trusted part.

I would like, from another application access the functions defined in my untrusted.h that ultimately access the enclave.

how could I do that?

 

I would appreciate your help

 

regards

 

0 Kudos
2 Replies
Francisco_C_Intel
315 Views

One possible way is to convert your untrusted application into a shared library instead of an executable. Other possibilities include some sort of inter-process communications. 

It really depends on the details regarding what you are trying to build.

0 Kudos
Medina_Chirinos__Jor
315 Views

Hi Francisco,

I modified the makefile to get a shared library from my untrusted part instead of an exe. however, when I use a function (sgx_init()) prototyped in the header file from the untrusted section I get

undefined reference to `sgx_init()'
the change I made to the MAKEFILE was:
EXE
#sample: $(UNTRUSTED_DIR)/myenclave_u.o $(App_C_Objects)
# @$(CXX) $^ -o $@ $(App_Link_Flags)
# @echo "LINK =>  $@"
 
SHARED
libsample.so : $(UNTRUSTED_DIR)/myenclave_u.o $(App_C_Objects)
@$(CXX) -shared $^ -o $@
@echo "LINK => $@"
0 Kudos
Reply