Community
cancel
Showing results for 
Search instead for 
Did you mean: 
degefa__Fikadu
Beginner
46 Views

Error: (.text+0xb0): undefined reference to `sgx_unseal_data'

 Hello every one,

 

I am developing a simple program as a beginner to implement SGX data sealing.  while calling `sgx_unseal_data' from SGX SDK, it prompts compilation error. I did in the following way:

sgx_status_t ecall_unseal(sgx_sealed_data_t* sealed_data, size_t sealed_size,
      sgx_sealed_data_t* plaintext, uint32_t plaintext_len)
{
      sgx_status_t status = sgx_unseal_data(
           sealed_data,
          NULL,
           NULL,
         (uint8_t*)& plaintext,

          &plaintext_len);
return  status;
}

==================================

It seems all  make file, enclave edl file, eclave configuration file are set well.

 The error while compiling is as follows:

$ sgx-file-enc git:(master) ✗ make
cc -m64 -O2 -fPIC -Wno-attributes -I/opt/sgxsdk/include -DNDEBUG -DEDEBUG -UDEBUG -c enclave_u.c -o enclave_u.o
cc enclave_u.o app.o -o app -m64 -O2 -L/opt/sgxsdk/lib64 -lsgx_urts -lpthread -lsgx_uae_service
/usr/bin/ld: enclave_u.o: in function `ecall_unseal':
enclave_u.c:(.text+0xb0): undefined reference to `sgx_unseal_data'
collect2: error: ld returned 1 exit status
make: *** [Makefile:76: app] Error 1
 

 

would you help me in solving the error prompted?

Thank you a lot in advance.

0 Kudos
0 Replies