Reputation: 11
I'm trying to run the remote attestation sample code in the Intel SGX SDK. I always get error "Error, call sgx_ra_get_msg1 fail [wmain]." I think it's because that the sgx_ra_init(&g_sp_pub_key, b_pse, p_context)
function returns a zero value p_context
, which can't be used.
Is there anyone can run the remote attestation sample code correctly? PS:I can run the local attestation sample code, I think the Intel SGX development environment is OK.
Upvotes: 1
Views: 1770
Reputation: 708
I'm assuming you are running the sample code on Ubuntu provided by the following link: https://github.com/01org/linux-sgx/tree/master/SampleCode/RemoteAttestation
I had the same issue. There could be multiple reasons why it didn't work. I resolved it by following the steps mentioned below:
Check if the Intel(r) SGX driver is loaded. You can do that by checking to see if "isgx" is present on the loaded kernel modules list generated by running the following command on the Linux BASH shell:
sudo lsmod | sort
Assuming you've followed the aforementioned steps, you can then restart the AESM daemon service. On the shell:
sudo service aesmd restart
Just FYI, you can build your project for SGX Hardware & Debug modes and then execute by the following commands on the shell:
make clean
make SGX_MODE=HW SGX_DEBUG=1
./app
I hope this helps.
Upvotes: 2