Community
cancel
Showing results for 
Search instead for 
Did you mean: 
73 Views

Create a library to be used by an application

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
73 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.

73 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 => $@"
Reply