Last active
July 19, 2023 09:24
-
-
Save bluele/4df11bbeab541a149886c355d6a8a825 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -ex | |
ENCLAVE_PATH=./bin/enclave.signed.so | |
make all | |
make yrly | |
rm -rf ~/.lcp | |
./bin/lcp enclave init-key --force=true --enclave=${ENCLAVE_PATH} | |
./tests/e2e/scripts/gen_rly_config.sh | |
if [ -z "$SGX_MODE" -o "$SGX_MODE" = "HW" ]; then | |
./bin/lcp attestation ias --enclave=${ENCLAVE_PATH} | |
else | |
./bin/lcp attestation simulate --enclave=${ENCLAVE_PATH} --signing_cert_path=./tests/certs/signing.crt.der --signing_key=./tests/certs/signing.key --force | |
export LCP_RA_ROOT_CERT_HEX=$(cat ./tests/certs/root.crt | xxd -p -c 1000000) | |
fi | |
./bin/lcp service start --enclave=${ENCLAVE_PATH} --address=127.0.0.1:50051 --threads=2 & | |
LCP_PID=$! | |
make -C tests/e2e/cases/tm2tm network | |
sleep 3 | |
make -C tests/e2e/cases/tm2tm test | |
make -C tests/e2e/cases/tm2tm network-down | |
kill $LCP_PID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -ex | |
LCP_BIN=./bin/lcp | |
ENCLAVE_PATH=./bin/enclave.signed.so | |
make all | |
make yrly | |
rm -rf ~/.lcp | |
enclave_key=$(${LCP_BIN} --log_level=off enclave generate-key --enclave=${ENCLAVE_PATH}) | |
./tests/e2e/scripts/gen_rly_config.sh | |
if [ -z "$SGX_MODE" -o "$SGX_MODE" = "HW" ]; then | |
./bin/lcp attestation ias --enclave=${ENCLAVE_PATH} --enclave_key=${enclave_key} | |
else | |
./bin/lcp attestation simulate --enclave=${ENCLAVE_PATH} --enclave_key=${enclave_key} --signing_cert_path=./tests/certs/signing.crt.der --signing_key=./tests/certs/signing.key | |
export LCP_RA_ROOT_CERT_HEX=$(cat ./tests/certs/root.crt | xxd -p -c 1000000) | |
fi | |
./bin/lcp --log_level=info service start --enclave=${ENCLAVE_PATH} --address=127.0.0.1:50051 --threads=2 & | |
LCP_PID=$! | |
make -C tests/e2e/cases/tm2tm network | |
sleep 3 | |
make -C tests/e2e/cases/tm2tm test | |
make -C tests/e2e/cases/tm2tm network-down | |
kill $LCP_PID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment