hyperledger-labs / dancap

A lab for exploring attestation portability
Apache License 2.0
5 stars 4 forks source link

Missing dependency when running the docker. #4

Closed pegartillo95 closed 4 years ago

pegartillo95 commented 4 years ago

I have just downloaded the repo and followed the steps to execute it using docker provided. After building the docker and executing

SGX_MODE=SIM make clean && make

to build the attestor in simulation mode.

Then when I try to execute the attestor to generate the file I get the following error message about a missing dependency.

./attestor: error while loading shared libraries: libsgx_uae_service.so: cannot open shared object file: No such file or directory
dcmiddle commented 4 years ago

Thanks @pegartillo95 I could initially reproduce this. I cleaned out the containers and images and rebuilt the image. After that I can't reproduce the error anymore. I wonder if there was some dependency transition that was cached in older images. You could try docker container prune and then docker rmi dancap:latest Then rebuilding and re-running

./build-docker
./run-docker
SGX_MODE=SIM make clean && make
./attestor
pegartillo95 commented 4 years ago

Hello: I just realised that the problem is that the command to build in the SIM mode is in the wrong order and it tries to build it on hardware mode. If you execute instead.

make clean && make SGX_MODE=SIM

it works and you can execute the whole process.

pegartillo95 commented 4 years ago

P.D: Although now the whole process works and it generates the Quote, when passing that generated quote to the verifier I'm getting the following error that is different to the one you explain on your repo. I am using a Mac in case that makes any difference.

This is the error:

Reading 1116 bytes... Read attestation file successfully.
ERROR: Quote verification FAILED with error: e01d
 Verification error code: a006

The quote generated by the attestor is this one.

0000000 0002 0000 000b 0000 00ef 00ef efef efef
0000020 0000 0000 0000 0000 0000 0000 0000 0000
0000040 d5fc 0398 db20 631b 53ec b453 4153 a0ae
0000060 2048 37f3 e66a f2b2 4d03 7a3b 484b 78a7
0000100 0000 0000 0000 0000 0000 0000 0000 0000
*
0000140 0007 0000 0000 0000 0003 0000 0000 0000
0000160 8e66 da51 ca16 6e32 477c dd55 b618 ef14
0000200 ecd4 6cc0 54d1 18ad 9cd6 6cc4 2df0 bf8a
0000220 0000 0000 0000 0000 0000 0000 0000 0000
*
0000260 d783 e719 ea7d 14ca f670 f6ba 4d2a 4377
0000300 c803 db99 0269 9c0f ee70 fc1d c708 9ece
0000320 0000 0000 0000 0000 0000 0000 0000 0000
*
0000660 02a8 0000 eeee eeee eeee eeee eeee eeee
0000700 eeee eeee eeee eeee eeee eeee eeee eeee
*
0001320 eeee eeee d41a 2548 7aa9 8a3e 81bd 462a
0001340 0168 0000 eeee eeee eeee eeee eeee eeee
0001360 eeee eeee eeee eeee eeee eeee eeee eeee
*
0002100 eeee eeee eeee eeee eeee eeee 6656 de4a
0002120 545c 17cf a471 3dc2 509a 69d6
0002134
dcmiddle commented 4 years ago

@pegartillo95 good catch on the build variable. I've set defaults for the container and updated the docs to fix the variable usage. The error on verification is expected and I've updated the docs for that too. Basically a simulated attestation should fail verification because it's not real. Changes in #5 Thanks

dcmiddle commented 4 years ago

Further updated to SGX SDK 2.9 and updated dependencies in https://github.com/hyperledger-labs/dancap/pull/7.