Step 4: Verify enclave and interact with server
Step 4.1: Verify attestation
Replace IMAGE_ID_FROM_DEPLOYMENT with the image ID value noted from the previous step, and ENCLAVE_IP with the actual enclave IP.
# Run the verifier program using:
cargo run --release --target `uname -m`-unknown-linux-musl --bin verifier -- \
--endpoint http://ENCLAVE_IP:1300/attestation/raw \
--image-id "IMAGE_ID_FROM_DEPLOYMENT" \
--app app.pub
This should print a success message as well create a app.pub file with the public key of the enclave.
Step 4.2: Load data
Replace ENCLAVE_IP with the actual enclave IP.
# Load data into the server using:
cargo run --release --target `uname -m`-unknown-linux-musl --bin loader -- --ip-addr <ENCLAVE_IP>:4000 --app app.pub --secret loader.sec
This should print Data write succeeded!.
Step 4.3: Verify results
Replace ENCLAVE_IP with the actual enclave IP.
# Verify the results using:
cargo run --release --target `uname -m`-unknown-linux-musl --bin requester -- --ip-addr <ENCLAVE_IP>:4000 --app app.pub --secret requester.sec
This should print Result: 55 which corresponds to the sum of 12 and 43 that were loaded.